Skip to content

Instantly share code, notes, and snippets.

Last active Jun 7, 2016
What would you like to do?
firstFunctionCall : find([1,2], function(elements) {
alert("Results : "+elements);
alert("meanwhile I show up");
function find(elements, callback) {
//The time consuming operation
setTimeout(function() {
if(typeof callback === "function") {
else {
alert("Retrieved function is not a callback");
} ,2000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment