Last active
February 21, 2018 05:28
-
-
Save pankajladhar/70629949cf093b0ae90b8c0d4f5539d3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var console=(function(oldCons){ | |
logMethod = function(color, msg){ | |
oldCons.log('%c' + msg , 'color:' + color); | |
} | |
return { | |
violet: function(msg){ | |
logMethod("#9400D3", msg) | |
}, | |
indigo: function(msg){ | |
logMethod("#4B0082", msg) | |
}, | |
blue: function(msg){ | |
logMethod("#0000FF", msg) | |
}, | |
green: function(msg){ | |
logMethod("#008000", msg) | |
}, | |
yellow: function(msg){ | |
logMethod("#FFFF00", msg) | |
}, | |
orange: function(msg){ | |
logMethod("#FFA500", msg) | |
}, | |
red: function(msg){ | |
logMethod("#ff0000", msg) | |
} | |
}; | |
}(window.console)); | |
//console.violet("violet"); | |
//console.indigo("indigo"); | |
//console.blue("blue"); | |
//console.green("green"); | |
//console.yellow("yellow"); | |
//console.orange("orange"); | |
//console.red("red"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
typo in 'voilet' (should be 'violet')