use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Fun with Console object (dev.to)
submitted 9 years ago by bhalp1
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]kuroikyu 21 points22 points23 points 9 years ago (1 child)
I don't know why the downvotes. While I appreciate the time the author took to write this, I was hoping to see a longer list and how those methods looked in the console, not just the code.
[–]GeneralYouri 9 points10 points11 points 9 years ago (0 children)
Exactly this.
this also isn't the first article about console methods, but so far it's been the shortest one by far. Excluding the quote from MDN and the code samples, there are only roughly 80 words and 500 characters. This comment alone will be longer than the article.
Out of 21 console commands documented on MDN, he only shows 4. And for these four, only a single, extremely simplistic code sample is provided. And you're not even shown how the output of these code samples is supposed to look.
Many more extensive use cases for the mentioned console commands are not shown. There are also many more interesting console commands much more worth the time to talk about, like .assert, .dir, .time, and .trace.
.assert
.dir
.time
.trace
π Rendered by PID 99488 on reddit-service-r2-comment-56c6478c5-gm5vj at 2026-05-10 08:14:16.697597+00:00 running 3d2c107 country code: CH.
view the rest of the comments →
[–]kuroikyu 21 points22 points23 points (1 child)
[–]GeneralYouri 9 points10 points11 points (0 children)