How do you create a new object in JavaScript?

Q

How do you create a new object in JavaScript?

✍: Guest

A

var obj = new Object(); or var obj = {};

2010-12-21, 3139👍, 0💬