I have confused with synchronous and assynchronous in javascript is javascript is a synchronous or assynchronous ,suggest your idea or any relevant website , thanks
-
3Have you tried looking for it? stackoverflow.com/questions/2035645/…andrusieczko– andrusieczko2015-01-22 08:49:05 +00:00Commented Jan 22, 2015 at 8:49
-
It's both synchronous and asynchronous, take a look at Synchronous and asynchronous requests.cнŝdk– cнŝdk2015-01-22 08:55:02 +00:00Commented Jan 22, 2015 at 8:55
Add a comment
|
1 Answer
You can write either synchronous or asynchronous code in JavaScript. It is not only one or another. For instance, an ajax call is asynchronous by it's nature. On the other hand, when you execute a function to show an alert with a message when a button will be clicked is clearly an not asynchronous job. Hence, as you understand there are areas in JavaScript as in other programming languages, where we make use of asynchronous programming and others in which we make use of synchronous programming.