JavaScript · Junior · Question 1 of 75

How many data types does JavaScript have according to the specification?

Explanation

Primitives: number, bigint, string, boolean, null, undefined, symbol. Everything else is object, including arrays, functions and dates. Functions are objects, even though typeof returns 'function' for them.

Further reading

Problem with a question

JavaScript · Junior · question 1

Test yourself

Take the JavaScript · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz