Outstanding clarity. Thank you.
In your very first example (before the map ex.) you could call myCallback(someNumber) from inside mainFunction without ever sending it. It is within the scope and can be called like mainFunction(randomNumber, shouldCall) { ............... myCallback(randomNumber) ; ............... } Thank you. Ilia
Waiting for asynchronous programming Videos. Please make them a bit longer!!
I am having a problem at approx7:55. This example is not working for me. I made a local webpage to test all code and work on without having a terrible number of errors in the console, and have them in Notepad instead, and in the first example I did get the 40 - the code was easily followed. But he second example the callBack function is never defined or called and I get a value of 0 (zero) so what am I doing wrong? The code used is: ///now another way which I can't see working function anotherFunction(randomNumber,shouldCall, thecallBack){ let result=randomNumber; //shouldCall will equal true if(shouldCall){ //how will it call the function when there is no parameter or a function even made result=thecallBack(randomNumber); } return result; } function called with: thevalue = anotherFunction(20, true, (num) => num*2); There is no function called nor a callback function even defined or sent in the parameters! Please someone respond!
@1:09 How can you call a function named 'callBack()' when it is not even defined in the code anywhere.
It is really confusing for me (13:00) when you map through each element of an array and call a function myCustomeMapOperationCallback(itemFromArray). As this function is expecting parameter of "ItemFromArray" in its definition. But within the map function, you are passing nothing to this function.
iam firts
@contactdi8426