In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces javascript can use single quotation marks related knowledge, content detailed and easy to understand, simple and fast operation, has a certain reference value, I believe everyone read this javascript can use single quotation marks article will have a harvest, let's take a look at it.
Single quotes can be used in JavaScript. Single quotation marks can be used as the beginning and closing characters of strings, and only the same single or double quotation marks can be used to define the beginning and end; when the same quotation marks are used within the same quotation marks, the quotation marks need to be escaped, and different quotation marks can be directly nested.
Operating environment of this tutorial: Windows 10 system, Javascript version 1.8.5, Dell G3 computer.
Javascript can use single quotes
JavaScript can use single quotes.
Both single and double quotation marks can be used as the opening and closing characters of strings, and only the same single or double quotation mark can be used to define the opening and closing characters;
Use the same quotation marks within the same quotation mark, and escape is required before use. Different quotes can be nested.
Double quotes "" can be used without backslashes, for example:
var x="my name 'is' xxx" //backslash not required here
Double quotes " " in double quotes " " requires a backslash, for example:
var x="my name \"is\" xxx" //Here you need to add a backslash before each of the two top quotes
Double quotes "" in single quotes " " do not need backslashes, but can be added, for example:
var x1 ='my name "is" xxx' //No backslash needed here (recommended) var x2 ='my name \"is\" xxx' //add backslash effect is the same (not recommended)
The test effect is shown in the following figure:
About "javascript can use single quotation marks?" The content of this article is introduced here, thank you for reading! I believe that everyone has a certain understanding of the knowledge of "javascript can use single quotation marks?" If you still want to learn more knowledge, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.