0

In my script, i'm trying to create an object from some template. so i've created a function which returns and object.

What actually happens when I use the a,b,c calls?

function newO(){
  return {
    "key": "value"
  };
}
// call a
var x = new newO();
// call b
var x = new newO;
// call c
var x = newO();
yossi
  • 3,090
  • 7
  • 45
  • 65

0 Answers0