JS synchronous and asynchronous understanding

js synchronous and asynchronous problem usually refers ajax callback, if it is a synchronous call, the program will pause after issuing ajax call, it will continue to run until after the remote server generates a response. And if it is an asynchronous call, the program issues does not pause after ajax call, but behind the implementation of the code immediately after the server will automatically trigger the callback function returns information processing. In comparison, the best performance, the program does not appear Caton phenomenon, and synchronous calls are typically used for real-time processing and immediate access to the results of the asynchronous call.

Guess you like

Origin www.cnblogs.com/xzybk/p/12519334.html
Recommended