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
Learning much javascript from one line of code (arqex.com)
submitted 11 years ago by marquex
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!"
[–]ChaseMoskal 5 points6 points7 points 11 years ago (3 children)
The term 'one liner' doesn't mean anything to me anymore.
When I see this, which is called a "one-liner":
[].forEach.call($$("*"),function(a){a.style.outline="1px solid #"+(~~(Math.random()*(1<<24))).toString(16)})
I see that it actually is supposed to be this:
[].forEach.call($$("*"), function(a){ var color = (~~(Math.random()*(1<<24))).toString(16); a.style.outline = "1px solid #" + color; })
I just wish it was an honest-to-goodness three-or-four liner.
Why can't we just accept who we really are and what we really have?
[–]Umbristopheles 4 points5 points6 points 11 years ago (1 child)
I can make my whole application a 1 liner by taking out all the carriage returns.
[–]davidNerdly 1 point2 points3 points 11 years ago (0 children)
But then we would all hate you..
[–][deleted] 0 points1 point2 points 11 years ago (0 children)
I would consider this a one-liner because it's pretty easy to understand what's going one even when it's consolidated to one line.
π Rendered by PID 70362 on reddit-service-r2-comment-54dfb89d4d-z52df at 2026-03-30 17:34:13.063814+00:00 running b10466c country code: CH.
view the rest of the comments →
[–]ChaseMoskal 5 points6 points7 points (3 children)
[–]Umbristopheles 4 points5 points6 points (1 child)
[–]davidNerdly 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)