Better HN
topnewbestaskshowjobs
Log inSign up

noacctplz

1 karma · joined Mar 26, 2011 (15y ago) · 1 submissions

Submissions

comment 15y ago · link · parent

For #1, why not suppy a success and failure callback function to your doSomeAsyncCall function? There is no reason to muddle those two lines of logic together (which is the real reason for the described error).

And for #2, Relying on javascript hoisting functions isnt a smart way to keep your code organized.