Qusनिम्नलिखित में से कौन जावास्क्रिप्ट डेटा प्रकार नहीं है?
A. Null type
B. Undefined type
C. Number type
D. All of the mentioned
Solution
D. All of the mentionedExplanation
In JavaScript, there are several primitive data types and one complex data type. Here are the main data types in JavaScript:
Primitive Data Types:
- Number: Represents both integer and floating-point numbers. Example: let num = 10;
- String: Represents a sequence of characters enclosed within single (' ') or double (" ") quotes. Example: let str = 'Hello';
- Boolean: Represents a logical value indicating true or false. Example: let isTrue = true;
- Undefined: Represents a variable that has been declared but not assigned a value. Example: let variable;
- Null: Represents the intentional absence of any value. Example: let value = null;
- Symbol: Represents a unique identifier, introduced in ES6. Example: let sym = Symbol('description');
- BigInt: Represents integers of arbitrary precision, introduced in ES10. Example: let bigNum = 1234567890123456789012345678901234567890n;
Complex Data Type:
- Object: Represents a collection of key-value pairs, where keys are strings (or Symbols) and values can be any data type.