javascript - issue with adding a method in object -
i have object:
var point = { step: function () { alert("hello"); } };
this works:point.step();
.
how make work [ ]
notation? meaning point["property_name"]
.
it point["step"]();
. here snippet:
var point = { step: function () { alert("hello"); } }; point["step"]();
Comments
Post a Comment