I have a really rookie question....
If I define a JS object, and I use a function to generate a property value, why does the property value return a function instead of the generated value?
Example:
var object = {
bla: 1,
days: [],
test : function(){
return 'bla';
}
}
console.log(object.test);
I would expect object.test to be 'bla'. Instead it's function(){ return 'bla'; }... Why?