↓ Ir para o conteúdo principal

← todas as notas

📎 Webclip

Javascript Logging Tips and Tricks

The post lists several console methods that make front-end debugging more descriptive than console.log alone. It covers built-in styles for console.info, console.warn, and console.error, then shows how console.assert, console.table, and styled console.log output can improve logging.

Reading notes
#

  • console.info, console.warn, and console.error add semantic styling to log output.
  • console.assert logs an error when the assertion is false.
  • console.table is useful for table data and can accept a second argument to choose displayed columns.
  • console.log accepts a second argument for CSS-based custom styling.
  • The post points to the MDN console reference for more detail.