JAVASCRIPT DATA TYPE

Lavanya



JavaScript Data Type

JavaScript offers various data types to store different kinds of values, which can be categorized into two main types.

1. Primitive data type.

2. Non-primitive data type.

JavaScript is a dynamically typed language, meaning you don't need to specify the type of a variable because the JavaScript engine determines it dynamically. You can use `var` to declare a variable, and it can hold any type of value, such as numbers, strings, etc. For example:

Example


var x = 19;// number 
var = "Anga";// string

JavaScript primitive data types

JavaScript has five types of primitive data types, which are as follows:


JavaScript non-primitive data types

The non-primitive data types are listed as follows:


We will have an in-depth discussion on each data type later.
Tags
Our website uses cookies to enhance your experience. Learn More
Accept !

GocourseAI

close
send