There are eight basic data types in JavaScript: string, number, bigint, boolean, undefined, null, symbol, object. Here, all data types except Object are primitive data types.
// What output will the following code produce?
console.log(typeof 1); // number
console.log(typeof ''); // string
console.log(typeof {}); // object
console.log(typeof (() => {})); // function
console.log(typeof function() {}); // function
console.log(typeof true); // boolean