Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Asynchronous JavaScript

function myDisplayer(something) {
  document.getElementById("demo").innerHTML = something;
}

function myCalculator(num1, num2, myCallback) {
  let sum = num1 + num2;
  myCallback(sum);
}

myCalculator(5, 5, myDisplayer);
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #Asynchronous #JavaScript
ADD COMMENT
Topic
Name
1+8 =