Help me grasp this please. I want to create object, which property "visible" and method "hi", but getting error on line 2:
TypeError: Cannot set property 'visible' of undefined
in:
var NewFilter = {};
NewFilter.prototype.visible = false;
NewFilter.hi = function () { console.info("hi"); }
OK I know that I have to actually create that object, but why the hell it's property throwing error when it should eventually do upon object creation?