devNotes by Vincent Humeau

Console.log argument in object

Jul 07, 2018

Wrap your console.log arguments in an object literal to print the variable name along with its value.

console.log(isLoggedIn)
console.log({ isLoggedIn })

Still one of my favorite tips from @wesbos. So simple but effective 💪 pic.twitter.com/wMrDt4JDJ4

— Daniel Stefanovic (@DaniStefanovic) June 27, 2018

🌍 London, UK

  • RSS
  • vincent-humeau.com
  • Check this project on github