Sobes.tech
Intern

What primitive data types do you know in JavaScript?

sobes.tech AI

Answer from AI

In JavaScript, the following primitive data types exist:

  • Number — a numeric type, includes integers and floating-point numbers.
  • String — a sequence of characters.
  • Boolean — a logical type, takes values true or false.
  • Undefined — a type of value that has not been assigned to a variable.
  • Null — a special value representing "no value".
  • Symbol — a unique and immutable identifier.
  • BigInt — for representing integers of arbitrary length.

Primitives in JavaScript are immutable and are passed by value.