Relative Content

Tag Archive for javascriptasynchronouscallback

Asynchronous Programming – Callback

I am learning JavaScript and I am at Asynchronous and Callbacks. The problem is:
Create a function that returns true if the number is an even number and false if it is an odd number and assign this function to the variable callback on line 1 below.

In Javascript how is it possible to incorporate the result of a requested callback function in running code?

I come from PIC assembly-language programming where programs normally run continuously. I’ve now been learning Javascript for quite a while but have become a little blocked with the use of callback functions when they are given as a parameter of a call to an async function. I do realize that callbacks have been explained ‘forever’, but I have read about 10 books now cover to cover and get no clear answer.