12 / 07 / 2022

49. Console features in javascript

We would usually console.log for debugging. However, there are more ways to log the message to the console. For example, if we type console.error or console.warn, the message would be logged as a different color and easier to identify. Moreover, when we are testing a statement is true or false, we may use console.assert rather than use a condition to test. For logging a n array, we could use console.table to make it as a table for the data in the object, it would be clearer to check.