The following are the different types of data types used in JavaScript.
  • Numbers: Can represent both floating-point and integer numbers. Example: 5, 6.5, 7 etc.
  • String: A sequence of characters is called a string. Strings can be enclosed in JavaScript within single or double quotes. Example: "Advanced JavaScript Questions" etc.
  • Boolean: This represents a logical entity. It can have either true or false values.
  • Null: This type only has one value: null
  • Undefined: A variable whose value has yet to be assigned is undefined.
  • Symbol: It is not a primitive data type that can be used to represent literal forms. It is a built-in object whose constructor returns a unique symbol.
  • bigint: This is the bigint type that represents whole numbers larger than 253-1. You must add the letter n to the end of the number in order to form a literal bigint number.
  • Object: This is the most crucial data-type. It forms the foundation for modern JavaScript. These data types will be discussed in more detail in future articles.

Note: We have a list of all interview questions related to ES6. These are really helpful in cracking your interviews.

BY Best Interview Question ON 24 Aug 2022

Suggest An Answer