In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "whether legal names in javascript are case-sensitive". In daily operation, I believe many people have doubts about whether legal names in javascript are case-sensitive. The editor has consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "whether legal names in javascript are case-sensitive". Next, please follow the editor to study!
In JavaScript, method names are case-sensitive; JavaScript is a case-sensitive language that must enter language keywords, variables, function names, and all identifiers in a consistent case form.
The operating environment of this tutorial: windows10 system, javascript1.8.5 version, Dell G3 computer.
Is the legal name in javascript case sensitive?
Case sensitive.
JavaScript, a literal scripting language, is a dynamically typed, weakly typed, prototype-based language with built-in support for types. Its interpreter, called JavaScript engine, is a part of the browser and is widely used in the client scripting language. It was first used on HTML (an application under the standard general markup language) web pages to add dynamic functions to HTML web pages.
JavaScript is a case-sensitive language, which means that language keywords, variables, function names, and all identifiers must be entered in a consistent character case.
For example, the keyword "while" must be entered as "while", not "While" or "WHILE". Similarly, "online", "Online", "OnLine" and "ONLINE" are four different variable names.
Note, however, that HTML is not case-sensitive, which is easily confused because it is closely related to the client-side JavaScript. Many JavaScript objects and attributes have the same name as the HTML tags and properties they represent.
These tags and property names can be entered in any case in HTML, but they are usually lowercase in JavaScript. For example, in HTML, the event handler nature onclick is usually declared as onClick, but only onclick can be used in JavaScript code.
Variable names and function names in JS are case-sensitive
1. Variable name, for example:
Var a = '1mm; alert (A)
This will pop up that the variable is undefined.
2. Method name, for example:
Function Hello () {alert ("hello");} hello ()
Report: Uncaught ReferenceError: hello is not defined, the method is not defined.
Summary: when writing function names and method names in JS, you need to pay attention to keeping the case consistent.
At this point, the study of "whether legal names in javascript are case-sensitive" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.