Skip to content

Instantly share code, notes, and snippets.


Malintha/file.js Secret

Last active Jun 7, 2016
What would you like to do?
find(function() {
alert("Found the element");
alert("Meanwhile I show up");
function find(callback) {
//The time consuming operation
setTimeout(function() {
//calling the passed callback function after 2 seconds
} ,2000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment