Skip to main content

Command Palette

Search for a command to run...

JavaScript Data Types

Published
1 min readView as Markdown
M

Software Engineer intern @Azend Technologies | 3rd year)| Undergraduate at Faculty of Information Technology | BSc (Hons.) ITM | University of Moratuwa.

In JavaScript, several data types are used to store different types of values. These include:

  1. String: A sequence of characters, such as "hello" or "javascript".

  2. Number: A numerical value, such as 42 or 3.14.

  3. Boolean: A true or false value.

  4. Undefined: A variable that has been declared but has not been assigned a value.

  5. Symbol: A unique and immutable data type introduced in ECMAScript 6.

  6. Object: A collection of key-value pairs.

  7. Array: An ordered collection of values.

  8. Function: A block of code that can be executed repeatedly.

  9. BigInt: A numeric data type for integers of arbitrary length.

  10. null: special value which represents no value or no object.

And , JavaScript is a dynamic type system, which means that a variable can hold values of any data type. For example, a variable can be first assigned a string value and then reassigned a number value.

More from this blog

Mifras Gaffoor's Blog

15 posts