DEV Community

Tejkumar Kempaiah
Tejkumar Kempaiah

Posted on

🔥 Objects in JavaScript

☑️ What are Objects?

  1. Objects are collection of property and property values
  2. Every object has state and behavior
  3. A real time object is mimicked in the programming world
  4. A object can contain below things in it.

a. variable(integer, decimal, Boolean, character, string)
b. array
c. function
d. another object

☑️ How to create objects in JavaScript?

image

Output:

image

☑️ How to make an object read only?

image

Output:

image

☑️ How to make an object extensible(un expandable) but modifiable

image

Output:

image

☑️ How to expand an object property ?

image

Output:

image

☑️ How to add an Boolean object property to an Object?

image

Output:

image

☑️ Object DE structuring

image

Output:

image

Top comments (0)