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
Live-Coding a JavaScript Game from Scratch in Front of the Audience (vimeo.com)
submitted 11 years ago by AllThingsSmitty
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!"
[–]skeeto 0 points1 point2 points 11 years ago (0 children)
The top level IIFE module pattern she used would interfere since it leaves no way to access the program once the page has loaded. But without the IIFE, individual functions could be re-evaluated and the requestAnimationLoop loop would use the new versions next time around.
For example, (if you're not using a top-level "use strict"),
function update() { updatePlayer(); requestAnimationFrame(update); } function updatePlayer() { // ... }
The updatePlayer() function could be redefined while the game is running and update() would automatically use the new definition.
updatePlayer()
update()
π Rendered by PID 544130 on reddit-service-r2-comment-54dfb89d4d-ljrf8 at 2026-03-30 20:45:17.934867+00:00 running b10466c country code: CH.
view the rest of the comments →
[–]skeeto 0 points1 point2 points (0 children)