Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the JavaScrip data types

2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

Today, I will talk to you about what JavaScrip data types are, which may not be well understood by many people. in order to make you understand better, the editor has summarized the following for you. I hope you can get something according to this article.

Reserved word:

# # naming rules and specifications of variables

The name of a variable, function, property, or parameter of a function.

Identifier command rules:

Consists of letters, numbers, underscores or dollar signs

Cannot start with a number

Case sensitive

You cannot use keyword reserved words as identifiers.

# # data Type

# numbers

Decimal system

Octal: a number that begins with 0, with 1 for every octal

A number that begins with hexadecimal / 0x, with a range of 1-9A-F for every 16 digits.

Numerical range

# string

String type, using double quotation marks or 'wrapped characters

String concatenation

The + sign has a string concatenation function, which can concatenate two strings into a single string.

The + sign also has the function of arithmetic addition, which can add two numbers.

If there is a string on both sides of the + sign, then it is the function of the string, and if it is all numbers, then it is the function of arithmetic.

Boolean type

Boolean type: true and false, case sensitive, do not write as True or False

# # null&undefined

They all belong to the type of obtaining abnormal values.

Undefined represents a variable with no assignment

Null represents an empty value, (for example: get an element, id is miswritten, can't get it, return a null)

After reading the above, do you have any further understanding of the JavaScrip data types? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report