Which of the following is NOT a primitive data type in JavaScript?
- Object
- Number
- String
- Function
In JavaScript, primitive data types include Number, String, Boolean, Null, Undefined, and Symbol. Object is not a primitive data type; it is a reference data type that can hold collections of key-value pairs or functions. Primitive data types are immutable, whereas objects are mutable.
Loading...
Related Quiz
- In JavaScript, you can add a new property to an object by simply assigning a value to it with the _________ operator.
- You are developing an e-commerce website and want to fetch product details asynchronously to avoid page reloads. Which method might be appropriate for managing successive data retrieval operations in a clean and maintainable manner?
- What is a closure in JavaScript?
- How does the prototype property behave in arrow functions?
- What was the main reason for JavaScript's creation at Netscape?