In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the relevant knowledge of JavaScript letter case and function instance analysis, the content is detailed and easy to understand, the operation is simple and fast, and has a certain reference value, I believe you will have something to gain after reading this JavaScript letter case and function example analysis article, let's take a look.
JavaScript comment
Not all JavaScript statements are "commands". The content after the double slash / / is ignored by the browser:
/ / I will not execute
JavaScript data type
JavaScript has a variety of data types: numbers, strings, arrays, objects, and so on:
Varlength=16;//Number is assigned by numeric literal quantity
Varpoints=x*10;//Number assigns values through literal quantities of expressions
VarlastName= "Johnson"; / / String is assigned literally through a string
Varcars= ["Saab", "Volvo", "BMW"]; / / Array is assigned by array literals
Varperson= {firstName: "John", lastName: "Doe"}; / / Object is assigned literally through the object
The concept of data types
Data type is a very important content in programming language.
In order to manipulate variables, it is important to understand the concept of data types.
If the data type is not used, the following instances cannot be executed:
16 + "Volvo"
16 how is the addition of "Volvo" calculated? Will the above result in an error or output the following result?
"16Volvo"
You can try to execute the above code in the browser to see the effect.
You will learn more about data types in the following chapters.
JavaScript function
JavaScript statements can be written in functions, and functions can be referenced repeatedly:
Reference a function = call the function (execute the statement within the function).
FunctionmyFunction (a _ r _ b) {
Returna*b;// returns the result of a times b
}
JavaScript letter case
JavaScript is case-sensitive.
When writing JavaScript statements, be careful to turn off the case switch key.
The function getElementById is different from getElementbyID.
Similarly, the variables myVariable and MyVariable are different.
This is the end of the article on "JavaScript letter case and function example Analysis". Thank you for reading! I believe you all have a certain understanding of the knowledge of "JavaScript letter case and function example analysis". If you want to learn more, you are welcome to follow 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.