Values, Types, and Expressions
Primitive Types
Work with numbers and booleans, and read a value's type.
Primitive Types
primitive_types.js
const n = ;
const big = n > 10;
const kind = typeof n;
console.log("n=" + n);
console.log("big=" + big);
console.log("kind=" + kind);
const n = ;
const big = n > 10;
const kind = typeof n;
console.log("n=" + n);
console.log("big=" + big);
console.log("kind=" + kind);
const n = ;
const big = n > 10;
const kind = typeof n;
console.log("n=" + n);
console.log("big=" + big);
console.log("kind=" + kind);
primitive-types
Numbers and booleans are primitive values. A comparison yields a boolean, and `typeof` reports the type name as a string.