Los Angeles, CA

Three ways to create a JavaScript object

Three ways to create a JavaScript object

There are three ways to create a new object in JS

var obj = {};

var objFoo = Object.create(Object.prototype);

var lastObj = new Obj();

Which one do you use?

Facebook Comments