callback functions in Javascript
<p>I know that ajax calls are asynchronous but there are situations like some synchronous execution is needed. For Example,</p>

<pre><code>loadMyProfile();
editMyProfile();
</code></pre>

<p>These are two javascript functions I want loadMyprofile() should be executed completely and after that it should call editMyProfile(). But that is not happening because its asynchronous.I have heard like callbacks will be the best to handle this situation. So could anyone please explain about callbacks and a sample associated with this example? </p>

<p>Any help will be appreciated!</p>

<p>Thanks,<br>
Karthik</p>
