Data Types in Node js
In Node.js, data types are essentially JavaScript data types since Node.js is built on the V8 JavaScript engine. These data types can be broadly classified into primitive and non-primitive types. Below is an overview of data types in Node.js:
Primitive Data Types
These are immutable and represent single values.
Number
Represents both integer and floating-point numbers.
'
), double ("
),
or backticks (`
).
true
or false
.Non-Primitive (Complex) Data Types
These can store collections of values or more complex entities.
Object
Represents key-value pairs.
Special type of object used to store ordered collections.
A callable object that can perform operations.