JavaScript data types
JavaScript data types, primitives, typeof, and JSON values
Learn JavaScript data types with focused lessons on primitive values, typeof, type conversion, comparisons, nullish coalescing, Symbol, BigInt, methods of primitives, numbers, strings, Date, and JSON serialization.
Data type lessons and concepts
Primitive data types
Understand strings, numbers, booleans, null, undefined, bigint, symbols, and how JavaScript stores values.
Outcome: Recognize the kind of value your code is reading, storing, or returning.
- JavaScript data types
- primitive types JavaScript
- typeof
Type conversion
Learn how JavaScript converts values to strings, numbers, and booleans in explicit and implicit operations.
Outcome: Avoid surprises from implicit conversion and choose explicit conversion when needed.
- JavaScript type conversion
- type coercion
- Boolean conversion
Comparisons and equality
Compare values with predictable rules and understand where loose equality can convert types.
Outcome: Use comparisons without accidentally hiding data type mistakes.
- JavaScript comparison
- strict equality
- loose equality
Nullish values
Work with null and undefined safely, including the nullish coalescing operator for fallback values.
Outcome: Handle missing values without replacing valid falsy data such as 0 or empty strings.
- null undefined JavaScript
- nullish coalescing
- ?? operator
Symbols
Use Symbol values for unique property keys and understand where symbols fit in object protocols.
Outcome: Recognize symbol-based APIs and avoid property key collisions.
- JavaScript Symbol
- symbol type
- unique property keys
Numbers and BigInt
Study number behavior, numeric methods, safe integer limits, floating-point details, and BigInt values.
Outcome: Choose number or BigInt based on precision, size, and operation requirements.
- JavaScript number
- BigInt JavaScript
- safe integer
Strings
Work with string values, escaping, indexing, searching, slicing, Unicode behavior, and string methods.
Outcome: Manipulate text data deliberately in browser and application code.
- JavaScript string
- string methods
- Unicode strings
Methods of primitives
Understand how primitive values expose useful methods while staying different from objects.
Outcome: Use primitive methods without confusing primitive values with object wrappers.
- methods of primitives
- primitive wrapper
- JavaScript primitives
Date and time values
Represent moments with Date objects, parse dates, format values, and compare time-based data.
Outcome: Handle date values for records, timers, forms, and API data.
- JavaScript Date
- date and time JavaScript
- timestamp
JSON values
Serialize and parse JavaScript objects, arrays, numbers, strings, booleans, and null with JSON.
Outcome: Move typed data between JavaScript, storage, and network APIs.
- JSON JavaScript
- JSON parse
- JSON stringify