Javascript: global var doesn't work. (using SDK.REST.retriveMultipleRecords)
问题 I don't understand why i can't affect my global variable. I don't understand why this doesn't work.. I believe that it has to do with SDK.REST.retriveMultipleRecords, but i dont understand how. As you can see in first alert it works. but in 2nd it shows as "Undefined". In this fiddle, i have a simple example about defining a global variable and it works. Can anyone help with this issue? Why it is not affecting my globalVar? Players = new Array(); //GLOBAL VAR function setPlayers(topNumber){