I have the function Log which prints data along with passed arguments, how can I print the content & at the same time always print the word \"Report: \" at the beggining
You can override the console.log easily
console.log
(function(){ if(window.console && console.log){ var old = console.log; console.log = function(){ Array.prototype.unshift.call(arguments, 'Report: '); old.apply(this, arguments) } } })(); console.log('test')
Demo: Fiddle