News for hackers. Stuff that matters.
Re:We have a problem with promises by nolanl on Monday May 18, 2015 @10:58AM (#9564801)
If anyone's confused by the 4 "puzzles," I whipped up a JSBin to demonstrate: http://jsbin.com/tuqukakawo/1/edit?js,console,output
Re:We have a problem with promises by eevilspock on Monday May 18, 2015 @11:37AM (#9565037)
What if the doSomethingElse in #3 returns a function that is equivalent to the doSomethingElse of #1? Shouldn't #3 then be identical to #1?
Re:We have a problem with promises by nolanl on Monday May 18, 2015 @11:57AM (#9565134)
Yes, but in most code I've seen, that's a typo rather than someone intentionally writing a function that returns a function. You can definitely do it!