In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the relevant knowledge of "what are the basic data types of Js". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
There are six data types String in js: string Number: numeric Boolean: Boolean Null: null Undefined: undefined Object: object; where String,Number,Boolean,Null,Undefined belongs to the basic data type and Object belongs to the reference data type.
What does the data type mean?
The data type refers to the literal type.
Six basic data types of Js
String string
-using strings in js requires quotation marks
-double quotation marks or single quotation marks can be used, but not mixed
-quotation marks cannot be nested
Number numerical type
All numeric types in js are Number
Including integers and floating point numbers
You can use one operator, typeof.
-check variable types
Syntax:
Typeof variable
String is returned when checking the string
Number is returned when the value is checked
Number.MAX_VALUE, the maximum value that can represent a numeric value in js
Boolean Boolean type
Boolean: Boolean valu
There are only two Boolean values, which are mainly used for logical judgment.
True
-means true.
False
-indicates false
Checking a Boolean value with typeof returns a boolean
Null (null)
The value of the Null (null) type is only one null
The value null is specifically used to represent an empty object.
When a null is checked with typeof, object is returned.
Undefind (undefined)
There is only one value for Undefind (undefined) type, which is undefind
When you declare a variable without assigning a value to it, it is Undefind.
This is the end of the content of "what are the basic data types of Js". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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: 293
*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.