Computer Science, asked by shivam8556, 11 months ago

How do you create a new object in JavaScript?​

Answers

Answered by TejasvaniChauhan
4

Answer:

Different ways of creating an Object in javascript

1.Using the Object() constructor: var d = new Object(); ...

2.Using Object.create() method: var a = Object.create(null); ...

3.Using the bracket's syntactig sugar: var b = {}; ...

4.Using a function constructor. var Obj = function(name) { this. ...

5.Using the function constructor + prototype: ...

6 Using ES6 class syntax: ...

7.Singleton pattern:

Explanation:

Hope this will help uh☺☺

Answered by terapapa3806
0

Answer:

Yegng5ynehneggghyeeey

Explanation:fahyyenkyy374476

Similar questions