data types in js

data types in javascript

  • Profile picture of Mcs
  • by Mcs June 30, 2025

JavaScript data types categorize the different kinds of values that can be stored and manipulated within the language. These are broadly divided into two categories: primitive and non-primitive. 

JavaScript has two main categories of data types:

1. Primitive Data Types

These hold a single value.

Primitive Data

2. Non-Primitive (Reference) Data Types

These hold collections of values or more complex data.

Non-Primitive

Comments

Add new comment

Restricted HTML

  • Allowed HTML tags: <br> <p> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <cite> <dl> <dt> <dd> <a hreflang href> <blockquote cite> <ul type> <ol type start> <strong> <em> <code> <li>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.