- Web Development with MongoDB and Node(Third Edition)
- Bruno Joseph D'mello Mithun Satheesh Jason Krol
- 235字
- 2021-07-08 10:32:44
Data types
Data types are the base of any language. The data types available in JavaScript are
as follows:
- Number
- String
- Boolean
- Object
- Null
- Undefined
- Symbol (new in es6)
In our code, every variable we declare will contain values that belong to any of the preceding types. Number, String, and Boolean types are quite straightforward to understand. These comes under the primitive data types supported by the language. Here, one important point is to note that JavaScript has no distinction between integers or floating points at its type level.
Types such as array, function, regex, and date come under the object data type.
They are considered to be composite data types. So the functions that you define
in your code will also be nothing but objects.
Null and undefined are two special types supported by JavaScript. Null points
to a deliberate non-value, whereas undefined points to an uninitialized value. So, when you just declare a variable and haven't yet initialized it with a value, the variable will be of undefined type. Last but not least, es6 has introduced a new primitive data type of symbol. They are used for unique property keys and constants representative concepts.
We are not using them in context of our book, however you can visit the following link for more details http://exploringjs.com/es6/ch_symbols.html.
So before we understand various ways to define functions, arrays, and objects, lets go through operators and flows.
- Learning Apex Programming
- Architecting the Industrial Internet
- Spring Boot+Spring Cloud+Vue+Element項目實戰(zhàn):手把手教你開發(fā)權(quán)限管理系統(tǒng)
- Practical Windows Forensics
- Python算法從菜鳥到達人
- Hands-On Full Stack Development with Go
- 智能手機APP UI設(shè)計與應用任務(wù)教程
- Quantum Computing and Blockchain in Business
- C語言程序設(shè)計實訓教程與水平考試指導
- 小程序從0到1:微信全棧工程師一本通
- JavaScript悟道
- 百萬在線:大型游戲服務(wù)端開發(fā)
- Java核心編程
- Python Penetration Testing Essentials
- jQuery基礎(chǔ)教程(第4版)