Getting Started: Easy Way to Objects in Javascript

In JavaScript objects controls almost everything, objects is the main route, the emperor of JavaScript, if you understand how objects works in and out, there’s chances you will understand how JavaScript works. 

Almost Everything in JavaScript are objects, ranging from functions to object itself etc, except the primitive values. Even some primitive values when called with the ‘new’ keyword will still return an object.

Math, RegEx, Date, function are all objects, with the new keyword string, number, Boolean will also return an object.

what are primitive values ?

Primitive values are values with no property and methods, In JavaScript Primitive values are not objects, they are immutable and hard coded value, which can’t be change.

Example of primitive values in JavaScript are string, numbers, Boolean, null, and undefined. 

Let name = ‘John Doe’

Primitive data types 

Primitive data type are data that has a primitive value. 

Leave a Comment

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