I am a guy who lived and worked in the mobile apps marketing in China for the past 7 years. Since 2020 I decided to shift my career to become a Full Stack dev and joined to a remote full time bootcamp
Hi, this article is going to be very useful, thank you.
I do have a question though. I encountered this problem not a long time ago but I couldn't find an answer to it.
When I run this on the Chrome console:
it takes around 35 seconds to display on Chrome console the result which is around 5000 ms.
Does this mean that while the (V8?) takes 5 seconds to run the code, Chrome console is much slower to show the result of all iterations?
I am a guy who lived and worked in the mobile apps marketing in China for the past 7 years. Since 2020 I decided to shift my career to become a Full Stack dev and joined to a remote full time bootcamp
I love using css colors and sizing in my logging when I have a lot of noise. console.log(“%cMy Message”, color: “red”) will print a red colored My Message.
Looks like I forgot my quotation marks around the color:red part. Check out facebook’s console sometime. It’s decked out (or at least it used to be, I don’t have fb anymore)
I am a guy who lived and worked in the mobile apps marketing in China for the past 7 years. Since 2020 I decided to shift my career to become a Full Stack dev and joined to a remote full time bootcamp
Hi, this article is going to be very useful, thank you.
I do have a question though. I encountered this problem not a long time ago but I couldn't find an answer to it.
When I run this on the Chrome console:
it takes around 35 seconds to display on Chrome console the result which is around 5000 ms.
Does this mean that while the (V8?) takes 5 seconds to run the code, Chrome console is much slower to show the result of all iterations?
Printing to the console is slow. Yes. Have you tried the same thing without a .log in the loop? Probably much much faster
Yep, just tried as you suggested and it turned out that an addition without console.log() is roughly 2500 times faster. I got it, thank you.
This isn’t specific to chrome
Excellent, I love .table() and now I have some new console tools to use! Great job and great clarity in your style.
.table() has become one of my new favorites, it makes viewing datasets much easier
Using
console.info('my message')you can deliver my message 😆TIL about console trace and assert! Thank you!
Nice info
This is great information. I honestly had no idea. Thank you so much for sharing this.
Thanks for .table()😁
Can you expend your post with color syntaxes ?
Thank you so much, .table save my mind now ! 😂
Yes, working on an update to include color syntax as well
I love using css colors and sizing in my logging when I have a lot of noise. console.log(“%cMy Message”, color: “red”) will print a red colored My Message.
Thanks for the tips
This is something I actually didn't know was possible, thanks for that tip. I'll actually update the post to include this as well
Looks like I forgot my quotation marks around the color:red part. Check out facebook’s console sometime. It’s decked out (or at least it used to be, I don’t have fb anymore)
I come here to see all the methods I already know, not expecting anything new, but I actually saw some that I didn't knew, so thank you.
I'm glad you were able to find some new methods on here
Thanks for that overview, console object is definitely underused. I also write 'console.count()' to get the times a function is called.
My mind has been blown.
Great article indeed.
I actually learned stuff.
I did not know FB had styled the console like that!
Very useful console functions.
Thanks!
Recently I accidentally came to know about these from MDN reference and thinking of making a post on this...
Anyway Nice post 🤍
the code is not the reason why it froze, it runs smoothly.
It is also possible to use console.log with JSON.stringify(someObject, null, 2)

Fantastic - bookmarked!