4 ms·
A lot of your (my problems) would be solved if you understand what is async (as Zyst has already mentioned). This was a very very big problem for me coming off
by iKSv2 8y ago
A lot of your (my problems) would be solved if you understand what is async (as Zyst has already mentioned). This was a very very big problem for me coming off PHP (which is sequential, statement 2 gets executed after statement 1). So when I started with ajax requests, I used to put in timeouts, for loops which will wait for 1 second and see if operation completed or not and what not.
That and not declaring variables in global scope unless completely required.
Also I wish I had known to start with Vanilla JS and stick to it unless completely familiar then jump to frameworks. I started with jquery and the withdrawal was awful but heavy learning experience IMO.