Skip to content

JavaScript

sgrgalande edited this page Jun 30, 2022 · 3 revisions

Primitive Types

  1. String

It represents a series of characters and is written with quotes. A string can be represented using a single or a double quote.

  1. Number

It represents a number and can be written with or without decimals.

  1. BigInt

This data type is used to store numbers which are above the limitation of the Number data type. It can store large integers and is represented by adding “n” to an integer literal.

  1. Boolean

It represents a logical entity and can have only two values : true or false. Booleans are generally used for conditional testing.

  1. Undefined

When a variable is declared but not assigned, it has the value of undefined and it’s type is also undefined.

  1. Null

It represents a non-existent or a invalid value.

  1. Symbol

It is a new data type introduced in the ES6 version of javascript. It is used to store an anonymous and unique value.

Clone this wiki locally