Possible Duplicate:
Chrome doesn’t recognize console.log when it’s called log
Can anyone tell me why this doesn't work when I set the method to console.log
?
var met = "console.log";
var msg = "HELLO WORLD";
var n = met.split(".");
var f = this;
$.each(n, function(k, v){
f = f[v];
});
f(msg);
this seems to work when I tried using alert