In my javascript I have an array of 3 elements:
var array = ["one", "two", "three"];
How do I create 3 html buttons such that each button's onclick calls a function with parameter array[i].
for result i want to have:
<button onclick='function("one")'></button>
<button onclick='function("two")'></button>
<button onclick='function("three")'></button>