Take this simple Test object and paste it into the console. You'll see that it says undefined
. The object is working because it also prints 123
, but what is the undefined
about?
Test:
var Test = new (function(){
return {
get testing(){
return "123";
}
}
});
console.log(Test.testing);
Console Output:
123
undefined