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

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -