Answer the question
In order to leave comments, you need to log in
How to make callback?
I can’t understand how the callback is done correctly, it’s already the second day, well, I’m not catching up with it. Please help me with my code, how to do it right - first we display AAAAA then BBBBB. First we make the one function, then when it completes we execute two....
<script type="text/javascript">
var one = function(callback)
{
setTimeout('document.write("<h1>AAAAAAAAAAAAAAAA</h1>")', 1000);
callback;
}
var two = function()
{
document.write("<h1>BBBBBBBBBBBBBBBBB</h1>")
}
one(two);
</script>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question