So as a C user, I really love using printf
. Now that I'm doing js applications I'm forced to use console.log()
. You can use console.log("User %s has %d points", userName, userPoints);
, but i want to create my own function to do the job, because im making a few changes. So I want to create a function that takes multiple parameters, and print them out accordingly.
Example of what i want to do
function(parm1,parm2,parm3...){
//Stuff
}
console.log("number:%d text:%s"par1,par2);