console.log takes a string and replaces tokens with values, for example:
console.log("My name is %s, and I like %", 'Dave', 'Javascript')
would print:
My name is Dave, and I like Javascript
I'd like to wrap this inside a method like so:
function log(msg, values) {
if(config.log == true){
console.log(msg, values);
}
}
The
…