The Array data type in JavaScript is used to represent a list of elements, where each element can be of any data type, including other arrays or objects.
18.
What will be the output of typeof NaN in JavaScript?
The typeof operator in JavaScript returns the data type of a variable or expression. In this case, typeof NaN will return the string 'number', indicating that NaN is considered a special numeric value in JavaScript rather than a distinct data type.
19.
What data type is used to represent a collection of key-value pairs in JavaScript?
The Map data type in JavaScript is used to represent a collection of key-value pairs, where each key is unique and can be of any data type, and each value is associated with a key.