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
  • 2,883
  • 7
  • 42
  • 61

0 Answers0