Hacker News new | ask | show | jobs
by CGamesPlay 4818 days ago
I recommend simply using console.debug, console.log, console.warn, and console.error, which differentiate for you.
2 comments

What about `console.info()`? Or is it a bit too adventurous?
info and log are indistinguishable, at least in Chrome.
Yes. So much about differentiation.
Maybe add console.assert to that list:

    console.assert(str.length === 10, "String is not 10 characters long!");
and console.group/groupEnd

    console.group("sums");
    console.log(1 + 1);
    console.log(2 - 3);
    console.groupEnd();