Magazine Logo
๐Ÿ“Œ Press Ctrl+D to bookmark this page.

Java Script Data Types

JavaScript has 8 Datatypes

1. String
2. Number
3. Bigint
4. Boolean
5. Undefined
6. Null
7. Symbol
8. Object

The Object Datatype

The object data type can contain:

  1. An object
  2. An array
  3. A date

Note: A JavaScript variable can hold any type of data.

Most programming languages have many number types:

Whole numbers (integers):
byte (8-bit), short (16-bit), int (32-bit), long (64-bit)

Real numbers (floating-piont):
float (32-bit), double (64-bit).

Javascript are always one type:
double (64-bit floating point).

+ Type Value
1 JavaScript Booleans Ture / False
2 JavaScript BigInt 64Bit - Number - A BigInt can not have decimals.
3 JavaScript Arrays JavaScript arrays are written with square brackets.
Array items are separated by commas.
4 JavaScript Objects JavaScript objects are written with curly braces {}.
Object properties are written as name:value pairs, separated by commas.

Sample1: BigInt


Sample2: Booleans


Sample3: Booleans


Sample4: String


Sample5: String Multiline


Sample6: Array


Sample7: Objects


Sample8: typeof


Leave a Comment

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

AdsReg Magazine We would like to show you notifications for the latest news and updates. You can disable it when you want.
Allow Notifications