Ques:- What are Datatypes in JavaScript?
Asked In :-
DREAMORBIT SOFTECH PVT, Newt Global India, ScriptsHub Technologies, ARMIA SYSTEMS, Maxgen Technologies Ahmedabad, XT Global, Testrig Technologies, Nuware Systems, Statestreet HCL Services, Multidots Solutions,
Right Answer:
JavaScript has the following data types:
1. **Undefined** - A variable that has been declared but not assigned a value.
2. **Null** - A variable that has been explicitly assigned a value of null.
3. **Boolean** - Represents a logical entity and can have two values: true or false.
4. **Number** - Represents both integer and floating-point numbers.
5. **String** - Represents a sequence of characters enclosed in quotes.
6. **Symbol** (introduced in ES6) - A unique and immutable primitive value.
7. **Object** - A collection of key-value pairs, including arrays and functions.
JavaScript has the following data types:
1. **Undefined** - A variable that has been declared but not assigned a value.
2. **Null** - A variable that has been explicitly assigned a value of null.
3. **Boolean** - Represents a logical entity and can have two values: true or false.
4. **Number** - Represents both integer and floating-point numbers.
5. **String** - Represents a sequence of characters enclosed in quotes.
6. **Symbol** (introduced in ES6) - A unique and immutable primitive value.
7. **Object** - A collection of key-value pairs, including arrays and functions.
Comments
string,boolean,null,undefined,number