How to Use `console.error` for Debugging in JavaScript

Always we have been using console.log but if your console.error under the catch block you can able to see the error in error mode in your developer console
Instead of
console.log(‘error’)
Use
console.error(‘error’)
use this in your console to see the difference in
Comments
Join the discussionNo comments yet. Be the first to comment.