Quantcast
Channel: Geekstrick
Viewing all articles
Browse latest Browse all 10

How to write a callback function in javascript?

$
0
0

A callback function is a function that is passed to another function as an argument and is executed after some operation has been completed. for example of a simple callback function that logs to the console after some operations have been completed. function extendArray(arr, callback) { arr.push(100); // then execute the callback function that was […]

The post How to write a callback function in javascript? appeared first on Geekstrick.


Viewing all articles
Browse latest Browse all 10

Trending Articles