nextRound
TechnologiesCoding ProblemsBookmarksLearning Paths
nextRound
TechnologiesCoding ProblemsBookmarksLearning Paths
nextRound

AI-powered interview preparation platform. Practice with curated questions, mock interviews, and personalized learning paths to crack your dream tech interview.

Quick Links

  • Technologies
  • Saved Questions
  • Pricing

Company

  • About Us
  • Contact Us

Legal

  • Privacy Policy
  • Terms of Use

© 2026 nextRound. All rights reserved.

TOPIC OVERVIEW

javascript/Data Types

The seven primitives, one reference type, and the coercion rules that trip everyone up.

10 QuestionsIntermediateHigh Priority ~11 min read

JavaScript has seven primitive types — string, number, boolean, null, undefined, symbol, and bigint — plus a single reference type, object, that everything else (arrays, functions, dates) is built on. The core distinction that matters isn't the list of types, it's how they're stored and compared: primitives are compared and copied by value, while objects are compared and copied by reference, which is why two identical-looking objects are never === to each other.

Because JavaScript is dynamically and loosely typed, values get coerced constantly, often invisibly. == triggers type coercion following a specific set of rules (which is why '' == 0 is true but '' == '0' is false), while === never coerces. typeof and instanceof look similar but check different things — typeof null famously returns 'object', a decades-old bug that's now permanent for backwards compatibility, and typeof only reliably distinguishes primitives, not object subtypes.

What you'll walk away knowing

The seven primitive types plus object, and how primitives differ from objects in storage and comparison
Why === is preferred over ==, and what coercion rules == actually follows
Known quirks worth knowing by heart: typeof null, NaN !== NaN, and why
How Symbol and BigInt differ from the other primitives and when they're actually used
1Explain the concept of a 'WeakMap' in JavaScript.Intermediate2What is symbol data type?Intermediate3What is the purpose of the `isNaN()` function?Beginner4Explain sets data structure.Beginner5What is the difference between `null` and `undefined`?Beginner6What is the difference between `==` and `===` operators?Beginner
All Topics
1
Basics
Data Types
Functions
Objects
2
Engine
JIT
V8
Event Loop and Runtime
Concurrency and Threading
Bytecode and Parsing
Execution Context
Garbage Collector
3
this
Call Apply Bind
Closure
Error Handling
4
String Operations
Array Operations
Iterator and Generator
Modules
5
Events
Promises
Web Workers
Web Sockets
6
Functional Programming
Currying
Higher Order Functions
Memoisation
7
ES6 Classes
ES6
PWA
Web Assembly
Browser APIS
8
Security
Code
Polyfills
Sharethis topic

Share via WhatsApp, X, Facebook, LinkedIn or copy link. Open Graph preview enabled.