What can we use instead of console.log() ?

Forums JavaScriptWhat can we use instead of console.log() ?
Staff asked 3 years ago

Answers (1)

Add Answer
Het Patel Marked As Accepted
Staff answered 3 years ago

You can use other methods for debugging:

info()
console.info(‘Debug message’);

warn()
console.warn(‘Debug message’);

error()
console.error(‘Debug error message’)

time()
console.time(label);

table()
console.table([“apples”, “oranges”, “bananas”]);

trace()
console.trace();

Subscribe

Select Categories