top of page
  • Writer's pictureRosario Riley

Primitive and Non Primitive Data Types in JavaScript

In JavaScript, data types are the different kinds of data that can be stored and manipulated in a program. There are two main categories of data types in JavaScript: primitive and non-primitive data types.



The most basic types of data in JavaScript are primitive types of data. They are immutable, meaning they cannot be changed once they have been created. The primitive data types in JavaScript are: undefined, null, boolean, number, string, and symbol.

Alternatively, non-primitive records types are greater complex and can hold more than one values. They are mutable, meaning they can be changed after they have been created. The non-primitive data types in JavaScript are: objects and functions.

Non-primitive data types, on the other hand, are more powerful and capable of storing multiple values. Arrays are a special kind of object, with additional properties and methods specifically designed for working with ordered collections of data.

Non-primitive data types, on the other hand, are passed by reference, meaning that when they are assigned to a new variable or passed as arguments to functions, a reference to the original value is used, and any changes made to the value will affect all references to it.

For More Information:                                    

Call us @ +91 9825618292

Recent Posts

See All
bottom of page