how to make function dynamic code example
Example: dynamically generate multiple functions javascript
var f = new Function('name', 'return alert("hello, " + name + "!");');
f('erick');
var f = new Function('name', 'return alert("hello, " + name + "!");');
f('erick');