function log(){ try{ console.log.apply(console,arguments); }catch(e){ try{ opera.postError.apply(opera,arguments); }catch(e){ alert(Array.prototype.join.call(arguments," ")); } } }
Test:
var arr = [23,4,655,57,567,97]; log(arr); //output: (6) [23, 4, 655, 57, 567, 97]