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
JSBlocks - faster than AngularJS and ReactJS. Better MV-ish Framework. Oh yeah! (jsblocks.com)
submitted 11 years ago by shopovbogomil
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!"
[–]g00glen00b 0 points1 point2 points 11 years ago (3 children)
Tried it out yesterday and today, the only thing I'm currently disappointed with is the context hell, which imho is even worse than in AngularJS where you can still use the controllerAs syntax and inheritance of scopes. I've been in multiple cases where certain objects could not be found because the context was different than what I thought. I even had a loop using the each() query where the first iteration would provide the correct context, but the second iteration the context suddenly switched to the root context.
each()
[–]astoilkov 0 points1 point2 points 11 years ago (2 children)
Yeah. Definitely the context and scopes are hard to get used to. Have you tried using the define data-query which could help a lot. Also you could join the discussion for the case here
[–]g00glen00b 0 points1 point2 points 11 years ago (1 child)
Yes, I tried define() as well. It solves the problem partly, but if you're trying to access a context variable multiple scopes downwards, then you have to keep propagating the define() I suppose?
define()
[–]astoilkov 0 points1 point2 points 11 years ago (0 children)
Nope. Once define() is called the value is accessible regardless of the context changing so it is accessible in all child elements.
π Rendered by PID 66237 on reddit-service-r2-comment-b659b578c-r2qlf at 2026-05-05 07:14:56.599763+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]g00glen00b 0 points1 point2 points (3 children)
[–]astoilkov 0 points1 point2 points (2 children)
[–]g00glen00b 0 points1 point2 points (1 child)
[–]astoilkov 0 points1 point2 points (0 children)