function Test() {} Test.prototype.extraMethod = function() { } var expressions = [ ["A single string"], [123], [["An", "Array", "Of", "Strings"]], [{ an: "obj", withNested: { objects: { inside: "of", it: true }}}], [Test], [new Test()] ]; function logAllWithWrapper() { for (var i = 0; i < expressions.length; i++) { log.apply(log, expressions[i]); } } function logAllWithNative() { for (var i = 0; i < expressions.length; i++) { Function.prototype.apply.call(console.log, console, expressions[i]); } } log("\n-----------"); log("Logging all expressions with wrapper log function"); log("-----------\n"); logAllWithWrapper(); log("\n-----------"); log("Logging all expressions with native console.log function"); log("-----------\n"); logAllWithNative();