Video Lesson

Lesson Notes

JavaScript Primitives

JavaScript has several primitive data types—simple values not objects.

1// String 2typeof "Hello" === "string" 3 4// Number 5typeof 42 === "number" 6 7// BigInt 8typeof 9007199254740991n === "bigint" 9 10// Boolean 11typeof true === "boolean" 12 13// Undefined 14typeof undefined === "undefined" 15 16// Null 17// typeof null === "object" // a known quirk in JS 18 19// Symbol 20typeof Symbol('id') === "symbol" 21 22// Example usage 23let name = "Alice"; // string 24let age = 30; // number 25const isStudent = false; // boolean 26let uniqueId = Symbol('id'); // symbol 27 28console.log(name, age, isStudent, uniqueId);

AI Assistant

Sign In Required

Sign in and subscribe to use the AI assistant for instant help with your lessons.

Sign In

Primitives in Javascript

A brief overview of the basic, non-object data types in JavaScript. JavaScript has several primitive data types—simple values not objects.

5m 56s

Course Content

0 of 32 lessons completed
6. Promises, Async and Await
0 of 0 completed
7. The DOM
0 of 0 completed