what is callback in JavaScript

JavaScript is asynchronous. It's means if you send HTTP request and on next line you execute something, it will not wait for the HTTP Response. For make this thing work, there is a strategy in JavaScript that is called Callback. $.get("demo_test.asp", function(data, status){ // This code will execute after response received. }); This is how…