AdsReg.com 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.

Note
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

JavaScript/006-MathematicalOperations/006

Sample2: Booleans

JavaScript/007-JavaScriptDataTypes/001Booleans

Sample3: Booleans

JavaScript/007-JavaScriptDataTypes/002Booleans

Sample4: String

JavaScript/007-JavaScriptDataTypes/003String

Sample5: String Multiline

JavaScript/007-JavaScriptDataTypes/004StringMultiLine

Sample6: Array

JavaScript/007-JavaScriptDataTypes/005Array01

Sample7: Objects

JavaScript/007-JavaScriptDataTypes/006Object

Sample8: typeof

JavaScript/007-JavaScriptDataTypes/007typeof

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.
Dismiss
Allow Notifications