JavaScript Datatypes

JavaScript has several data types −

  1. Number: Represents numeric values, including integers and floating-point and double numbers. Eg. 123, 123.45
  2. String: Represents a sequence of characters, including letters, numbers, and symbols, enclosed in single or double quotes.

Eg. “hello World”, “this is String”

  1. Boolean: Represents either true or false.
  2. Undefined: Represents a variable that has been declared but has not been assigned a value.
  3. Null: Represents an intentional non-value.
  4. Object: Represent complex data structures such as arrays, dates, and more.
  5. Symbol: A new data type introduced in ECMAScript 6, used to create unique and immutable identifiers.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top