Variables set during $.getJSON function only accessible within function?

$. GetJSON is asynchronous. That is, the code after the call is executed while $.

GetJSON fetches and parses the data and calls your callback.

Remember that when you supply a callback function, the point of that is to defer the execution of that callback until later and immediately continue execution of whatever is next. This is necessary because of the single-threaded execution model of JavaScript in the browser. Forcing synchronous execution is possible, but it hangs the browser for the entire duration of the operation.

In the case of something like $. GetJSON, that is a prohibitively long time for the browser to stop responding.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions