Question moved to Feedback, Please ignore (Timing of functions using function.done() looking for best practices)

Question moved to Feedback, Please ignore (Timing of functions using function.done() looking for best practices)
0.0 0

#1

hi everyone! Please take a look at this pen http://codepen.io/bencarp/pen/qRbKeM/
when I run it I get an error in the console “error: cannot read property ‘done’ of undefined.” I guess the function should return a value which is a promise. But how do I do that?