I think the problem you should worry about is the "area". This suggests that I understand your question here. You are curious why the โWaitโ is not set, because it seems to come after your decision.
For example, you have this snippet here:
var d = $.Deferred(); d.resolve("Foo Bar!"); var fooBar = "Waiting"; d.done(function(data){fooBar = data; }); console.log(fooBar)
What does it give?
Now we have this:
var d = $.Deferred(); var fooBar = "Waiting"; d.done(function(data){fooBar = data; }); console.log(fooBar) d.resolve("Foo Bar!");
and this:
var d = $.Deferred(); d.done(function(data){fooBar = data; }); d.resolve("Foo Bar!"); var fooBar = "Waiting"; console.log(fooBar)
Now check it out!
var d = $.Deferred(); console.log( fooBar); d.resolve("Foo Bar!"); var fooBar = "Waiting"; console.log( fooBar); d.done(function(data){fooBar = data; }); console.log(fooBar)
Think about the climb and the area .
source share