JavaScript is a lightweight, interpreted programming language used primarily to make web pages interactive and dynamic.JavaScript first name was "MOCHA".
DATA TYPES
JavaScript data types are divided into two categories.
Primitive Type - String,Number,Boolean,BigInt,Undefined,Null,Symbol
Non-Primitive Type - Arrays,Objects,Functions
Word - String
Number - number
Large no - BigInt
true/false - boolean
How to Check a Data Type?
JavaScript provides the typeof operator.
eg: let age = 25;
console.log(typeof age);
output: number
Static Typing
Languages like Java use Static Typing.
eg: int age = 25; // Here we must add which datatype the value blongs to.
Dynamic Typing
Languages like JavaScript, Python use Static Typing.
`eg: age = 25; // Here we need not to mention the data type.`
Top comments (0)