DEV Community

Cover image for Data Types in JavaScript
Hardik Mirg
Hardik Mirg

Posted on • Edited on

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!!