title: How to bind function to each object in an array?
body: <p>The question title may not be really clear or even inaccurate. However, this is what I want to do.  </p>
  
  <p>I want to have an array of objects. Each object will be a button. I want to bind predefined function to each button. A sample of the code is <a href="http://jsfiddle.net/chepukha/5wrm7/1/" rel="nofollow">here</a>.  </p>
  
  <p>Currently, I'm using eval() but I know it's slow and and is considered a bad practice due to security reason. And it doesn't work either because the eval() function will execute right away and call the 2 functions that have been declared.</p>
  
  <p>Can someone please suggest me what's the best approach to achieve my goal?</p>
  
  <p>Thanks</p>