The current edition of the ECMAScript spec defines 8 value types:

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

https://262.ecma-international.org/11.0/#sec-ecmascript-language-types

The typeof operator is a big source of confusion in JavaScript, because what it returns is not always the actual type of the value. The conversion table for typeof (https://262.ecma-international.org/11.0/#sec-typeof-operator) is like this

Type of val Result
Undefined undefined
Null object !!!
Boolean boolean
Number number
String string
Symbol symbol
BigInt bigint
Object (does not implement [[Call]]) object
Object (implements [[Call]]) function !!!

Note the two exceptions marked with !!!

To confuse us further, the language also provides wrapper functions for these 4 primitive types

  1. Boolean
  2. Number
  3. String
  4. BigInt

These functions

  • when called with new, return their argument converted to a corresponding wrapper object (Boolean, Number etc)

  • when called without new, return their argument converted to a corresponding primitive value (Boolean, Number etc)

These functions are also called implicitly (in the new or "constructor" mode) when a primitive is used in the "object" context (e.g. "foo".length)

🌐
JavaScript.info
javascript.info › tutorial › the javascript language › javascript fundamentals
Data types
A value in JavaScript is always of a certain type. For example, a string or a number. There are eight basic data types in JavaScript.
Variables
Variables are used to store this information. A variable is a “named storage” for data.
JavaScript Fundamentals
Indonesia · Italiano · 日本語 · 한국어 · Русский · Türkçe · Українська · Oʻzbek · 简体中文 · Tutorial · The JavaScript language · Let’s learn the fundamentals of script building. Hello, world! Code structure · The modern mode, "use strict" Variables · Data types ...
Async/await
However, there’s a hidden danger. We’ll see an example in this task and explore how to avoid it. Let’s say we have a connection to a remote service, such as a database.
Hello, world!
The <script> tag has a few attributes that are rarely used nowadays but can still be found in old code: ... The old HTML standard, HTML4, required a script to have a type. Usually it was type="text/javascript". It’s not required anymore. Also, the modern HTML standard totally changed the ...
People also ask

How do I check the data type of a variable in JavaScript?
You can use the "typeof" operator followed by the variable name to determine its data type. For example, "typeof myVariable" will return a string indicating the data type.
🌐
shiksha.com
shiksha.com › home › it & software › it & software articles › programming articles › introduction to javascript data types with examples
Introduction to JavaScript Data Types With Examples - Shiksha Online
Can JavaScript variables change their data type?
Yes, JavaScript variables are dynamically typed, which means they can hold different data types at different times. A variable can be assigned a number and later assigned a string or any other data type.
🌐
shiksha.com
shiksha.com › home › it & software › it & software articles › programming articles › introduction to javascript data types with examples
Introduction to JavaScript Data Types With Examples - Shiksha Online
What is the difference between null and undefined in JavaScript?
"null" is a value that represents the intentional absence of any object value, while "undefined" is a value that indicates the absence of a defined value. "null" is assigned by developers, whereas "undefined" is the default value for variables that have been declared but not assigned a value.
🌐
shiksha.com
shiksha.com › home › it & software › it & software articles › programming articles › introduction to javascript data types with examples
Introduction to JavaScript Data Types With Examples - Shiksha Online
🌐
BrainStation®
brainstation.io › learn › javascript › data-types
JavaScript Data Types (2025 Tutorial & Examples) | BrainStation®
February 4, 2025 - Sometimes it could be a logical ... known as primitive data types. JavaScript as a language provides the following eight basic data types:...
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › javascript-data-types
JavaScript Data Types - GeeksforGeeks
JavaScript data types determine the nature of data stored in variables, affecting how values are processed and interacted with in the code. Each data type has specific properties and behavior that impact how data is stored, accessed, and manipulated.
Published   October 5, 2025
🌐
Mozilla
developer.mozilla.org › en-US › docs › Web › JavaScript › Guide › Data_structures
JavaScript data types and data structures - JavaScript | MDN
This article attempts to list the built-in data structures available in JavaScript and what properties they have. These can be used to build other data structures. The language overview offers a similar summary of the common data types, but with more comparisons to other languages.
Find elsewhere
🌐
W3Schools
w3schools.com › js › js_datatypes.asp
JavaScript Data Types
In programming, data types is an important concept. To be able to operate on variables, it is important to know something about the type. Without data types, a computer cannot safely solve this: ... Does it make any sense to add "Volvo" to sixteen? Will it produce an error or will it produce a result? ... When adding a number and a string, JavaScript will treat the number as a string.
🌐
Shiksha
shiksha.com › home › it & software › it & software articles › programming articles › introduction to javascript data types with examples
Introduction to JavaScript Data Types With Examples - Shiksha Online
September 13, 2023 - Explore the fundamental data types in JavaScript - numbers, strings, booleans, arrays, objects, null, & undefined. Click here to dive deeper!
🌐
Tutorial Republic
tutorialrepublic.com › javascript-tutorial › javascript-data-types.php
Understanding the JavaScript Data Types - Tutorial Republic
There are six basic data types in JavaScript which can be divided into three main categories: primitive (or primary), composite (or reference), and special data types. String, Number, and Boolean are primitive data types.
🌐
Edureka
edureka.co › blog › data-types-in-javascript
What are the Different Data Types in JavaScript - Edureka
February 11, 2025 - Types are values that JavaScript can have. Below is a list of data types that JavaScript can have: ... The ‘Symbol’ data type is new in JavaScript. It has been included in the ES6 version. We can find the type of value or data by using the ‘typeof’ JavaScript operator.
🌐
Codecademy
codecademy.com › docs › javascript › data types
JavaScript | Data Types | Codecademy
May 15, 2024 - Learn how to use JavaScript — a powerful and flexible programming language for adding website interactivity. Beginner Friendly.Beginner Friendly15 hours15 hours · JavaScript uses seven primitive data types that are listed in the table below:
🌐
Hellojavascript
hellojavascript.info › general javascript questions › javascript fundamentals › data types
Data Types - JavaScript Interview Questions | HelloJavaScript.info
There are eight basic data types in JavaScript including Number, String, Boolean, BigInt, Null, Undefined, Object, and Symbol. JS Frontend Interview Questions
🌐
Mozilla
developer.mozilla.org › en-US › docs › Web › JavaScript › Guide › Grammar_and_types
Grammar and types - JavaScript | MDN
The latest ECMAScript standard defines eight data types: ... Boolean. true and false. null. A special keyword denoting a null value. (Because JavaScript is case-sensitive, null is not the same as Null, NULL, or any other variant.) undefined. A top-level property whose value is not defined.
🌐
Medium
medium.com › @mila.mirovic98 › javascript-fundamentals-data-types-a805f83f0272
JavaScript fundamentals: Data Types | by Mila Mirovic | Medium
October 14, 2023 - We delve into the intricacies of data types, covering eight main types, including primitives like boolean, number, string, bigInt, symbol, null, and undefined, as well as the Object type.
🌐
Medium
medium.com › @aysunitai › javascript-data-types-1fcf287ed734
JavaScript Data Types. In JavaScript, there are seven… | by aysunitai | Medium
March 7, 2023 - In JavaScript, there are seven primitive data types: number, string, boolean, null, undefined, bigInt, and symbol. In addition to these…
🌐
DEV Community
dev.to › _ndeyefatoudiop › javascript-data-types-27-quick-questions-you-need-to-master-1828
✨🧱 JavaScript Data Types: 27 Quick Questions You Need To Master - DEV Community
June 3, 2024 - Every value in JavaScript has a specific type. This type determines what operations can be performed on the value and how it's stored 🗳️. This is known as the data type.
🌐
Topcoder
topcoder.com › thrive › articles › javascript-data-types-objects-and-methods
Javascript Data Types, Objects, and Methods
JavaScript supports eight basic data types. String - It helps store textual data. ... Number - It stores a decimal or non-decimal number. ... BigInt - It stores numbers greater than 253-1 which are not permissible in number data type.
🌐
Javatpoint
javatpoint.com › javascript-data-types
JavaScript data types - javatpoint
JavaScript data types tutorial for beginners and professsionals with example, JavaScript primitive data types, JavaScript primitive data types, event, validation, object loop, array, document, tutorial
🌐
Metana
metana.io › metana | career-focused coding bootcamp › full-stack › javascript data types - metana
JavaScript Data Types - Metana
March 24, 2025 - Understanding JavaScript data types is fundamental for any developer working with this language. Whether dealing with primitive types or more complex reference types like objects and arrays, each type plays an important role in how you store, manipulate, and process data in your programs.