window.console or console object is under-rated with only
console.log() being used most of the time. However, the console object comes with a lot of advanced features.
In this article, we will be discussing the functions available on the console that can be handy at times.
Besides console.log(), there are a lot of other methods also available. You can try looking for the suggestions list in the browser’s console.
We can also concatenate multiple values using console.log(). Simply call console.log() with multiple parameters and all the values will be concatenated.
You can even pass multiple objects and the browser’s console will show them side by side.
Following are some of the examples of concatenation with console.log:
While console.log() can be used to print an object, we can also use console.table() to pretty print an object in the form of a table.
Just pass the object to print the object in a more readable format.
Notice, how it prints the values for the nested object.
It is used to print warning messages in the browser’s console.
It is used to print error messages in the console.
This can be used to calculate the time elapsed by our code to execute.
Before starting the execution of any operation, start the timer with console.time(‘TIMER_NAME’) and after the execution of the code, end the timer with console.timeEnd(‘TIMER_NAME’).
As soon as you call the timeEnd function, the elapsed time will get printed in the console.
The timer name should be same for time() and timeEnd()
This command is used to clear the console.
Running the last command resulted in the console being cleared with the following message.
Thank you for reading !
In this post, we are putting curated list of top tools with key features and download links "Top 19 Front End Web Development Tools to Consider in 2020"
Today I wanted to share with you the tools I daily use to increase my productivity as a front-end developer. 6 tools to increase your productivity as a Front-end developer.
Looking for an attractive & user-friendly web developer? HourlyDeveloper.io, a leading web, and mobile app development company, offers web developers for hire through flexible engagement models. You can **[Hire Web...
Learn how to focus your skills to become a master at front-end development. How to Master the Front-End Development. A few years back doing front-end work, especially on the web, was rather simple compared to the back-end where all the app logic used to reside. Nowadays, that has changed. Front-end development has evolved thanks to powerful frameworks and libraries supported by the evolution of the browsers and their respective APIs.