Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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?


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!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: