Skip to main content
Brave Programmer Logo

BraveProgrammer

BraveProgrammer

HomeProjectsBlogsCoursesLessonsAbout

Site footer

BraveProgrammer

Free coding courses, practical tutorials, and real projects from BraveProgrammer. Learn web development with React, Next.js, and TypeScript.

Navigation

  • Home
  • Projects
  • Blogs
  • Courses

Resources

  • About
  • Lessons

© 2026 BraveProgrammer. All rights reserved.

  1. Courses
  2. /
  3. JavaScript Course

Lesson 3 of 55 · javascript

Data Types & Type‑Coercion

Duration: 10 mins

Primitive types:

  • Number – all numbers are floating point (NaN, Infinity).
  • String
  • Boolean
  • null – intentional absence of any value.
  • undefined – uninitialised.
  • Symbol – unique identifiers.
  • BigInt – arbitrarily large integers.

Objects, arrays and functions are reference types.


Example: Type coercion pitfalls

'5' + 3   // "53" (string concatenation)
'5' - 3   // 2   (numeric subtraction)
true + 1  // 2   (true → 1)
Previous: Variables – var, let & constNext: Operators & Expressions