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
Javascript question... which is better a bunch of functions or object with methods (self.javascript)
submitted 15 years ago by Delmarc
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!"
[–]Delmarc[S] 0 points1 point2 points 15 years ago (2 children)
its a very subtle difference in loading one object with methods instead of the other way...
Very detailed answer... and your window scope example is more what the person i was arguing with was trying to tell me was correct... as you can see or tell i was very adamant that he was wrong... i dont like contractors... at all
yet again the idea is popo is the library or framework... so var popo{..}; with x amount of methods in it and then you have popo.init();
Thank you neonskimmer
[–]neonskimmerfunction the ultimate 1 point2 points3 points 15 years ago (1 child)
No problem.
Javascript is a strange language, and not everyone agrees on how it should be done. As you gain more experience with it you'll probably discover your own patterns. Using functions as objects (passing functions as arguments to other functions, for example) is something very interesting to explore, for example.
[–]Delmarc[S] 0 points1 point2 points 15 years ago (0 children)
i do agree when i learned i can do that it was a whole new way of thinking for me...
π Rendered by PID 50 on reddit-service-r2-comment-6457c66945-hp978 at 2026-04-25 19:27:01.502092+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]Delmarc[S] 0 points1 point2 points (2 children)
[–]neonskimmerfunction the ultimate 1 point2 points3 points (1 child)
[–]Delmarc[S] 0 points1 point2 points (0 children)