DEV Community

Cover image for Data Types in JavaScript
Hardik Mirg
Hardik Mirg

Posted on • Edited on

5 2

Data Types in JavaScript

Data Types in JavaScript

  1. Primitive Data Types
  2. Non-Primitive Data Types

Primitive Data Types

  • Integer: 1, 2, 3, etc.
  • String: "Hello World" etc.
  • Boolean: True/False.
  • Null: Used to depict no value.
  • Undefined: Variables with no defined value.

Non-Primitive Data Types

  • Object: Instance of key-value pairs; Similar to JSON; Contained within curly braces {}.

  • Array: A group of variables of any Data Types contained together within brackets []; Similar to lists in Python.

  • RegExp: Refers to "Regular Expression"

Hope you learned something useful today! Peace Out ✌️

Top comments (2)

Collapse
 
jonrandy profile image
Jon Randy 🎖️

You missed BigInt and Symbol in the primitive days types

Collapse
 
hardikmirg profile image
Hardik Mirg

Thanks for your help!
It'll be updated soon!!

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay