After reading the video tutorial "21 days learning JavaScript", I feel that I am familiar with the syntax, similar to C ++, similar to C #, and similar to Java! Sorry, these languages have similar syntaxes, such as data types and object methods (or functions). Since I am a cainiao, I cannot tell you exactly what it is ). In JavaScript, data types are classified into integer and floating-point types. Here, the floating-point type does not have the same single-precision or double-precision expression. The declaration of all variables only needs to use var (which is easy, do not record int long float double ......) What type of value you pay for it, and what type it is. Also, do not distinguish between characters and strings. In the past, sometimes, when using C #, it seems that "… Cannot be used as a string ". It's easy to remember, haha ............
The String type is similar to the string type in other languages. You can perform operations on the String, such as string truncation substring. The following is an example of a JavaScript string operation:
The Code is as follows:
Example 2-10