From my object iteration, i am trying to call the function and sending data as parameter, on my try, i am getting error..
what is the proper approach to call the function using the object keys..?
my try:
var x = function(msg){
console.log(msg);
}
var y = function(msg){
console.log(msg);
}
var obj = {x:"i am x", y:"i am y"}
var all = function(){
$.each(obj,function(key,value){
[key](value);
})
}
all();
any one figure ou the correct approach pls.. here is the jsfiddle link