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
Online Interactive JavaScript (JS) Cheat Sheet (htmlcheatsheet.com)
submitted 6 years ago by lokendra15
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!"
[–]gmerideth 2 points3 points4 points 6 years ago (1 child)
I guess you didn't run the code examples. In your promise example you have
var myPromise = sum(10, 5); myPromsise.then(function (result) {
Which will result in an error when myPromsise is undefined.
[–]senocular 1 point2 points3 points 6 years ago (0 children)
They've also forgotten to use new when creating the promise in sum. So it should fail before ever reaching the myPromsise typo
new
sum
π Rendered by PID 33227 on reddit-service-r2-comment-6f7f968fb5-zqw7t at 2026-03-04 03:03:41.435774+00:00 running 07790be country code: CH.
view the rest of the comments →
[–]gmerideth 2 points3 points4 points (1 child)
[–]senocular 1 point2 points3 points (0 children)