Sobes.tech
Intern

Milliseid primitiivseid andmetüüpe JavaScriptis teate?

sobes.tech AI

Vastus AI-lt

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, accepts true or false values.
  • Undefined — a type of value that has not been assigned to a variable.
  • Null — a special value indicating «absence of a value».
  • Symbol — a unique and immutable identifier.
  • BigInt — for representing integers of arbitrary length.

Primitives in JavaScript are immutable and are passed by value.