JavaScript- Data Types

Stela Capsa
2 min readOct 1, 2021

--

In JS a value is either Object or Primitive value.

Values Data Types

  1. Number
  2. String
  3. Boolean
  4. Undefined
  5. Null
  6. Symbol
  7. BigInt

JS automatically recognize the data type of value that is tore in a variable and is called DYNAMIC TYPING.

To find out the type of a value in Js we can use the function typeof.

In JS to re-assign the value of a variable we don’t use let prefix for example:

See how we reassigned value of the same variable name, and we don’t have to use let.

Nof let’s see how data type of undefined looks on our terminal.

Difference between const and let when assigning a variable.

let — can be assigned later in time

const — can’t be reassign later in time and can’t be empty variables.

Happy Coding !

--

--