Javascript - Primitive Data Type

About

Javascript has 6 primitive data type.

List

Wrapper

Except for null and undefined, all primitive values have object equivalents that wrap around the primitive values. See Data Type - Boxing (Autoboxing|Autowrapping) and Primitive Wrapper

  • String for the string primitive.
  • Number for the number primitive.
  • Boolean for the Boolean primitive.
  • Symbol for the Symbol primitive.

The wrapper's valueOf() method returns the primitive value.

Documentation / Reference





Discover More
How to check the equality of 2 values in Javascript? (If they are the same)

This page discusses Equality between 2 Javascript values. Because every value in javascript is an object, it applies also to the object. Object.is verifies the value. in case of the primitive,...
Javascript - Set

The Set interface represents a set data type and works only with primitive type as there is no way to define an object equality function. object Jsdoc Declaration Add/Delete Size Contains...
Javascript Module - Import (Es Module)

This page is the import statement defined in the es module specification The ES6 import is: a function for dynamic import (performed at runtime time) or a statement for static import (performed...



Share this page:
Follow us:
Task Runner