Skip to content

Instantly share code, notes, and snippets.

@happymishra
Last active June 16, 2019 06:57
Show Gist options
  • Save happymishra/8f63b0081a03576b2db206581dc3cb51 to your computer and use it in GitHub Desktop.
Save happymishra/8f63b0081a03576b2db206581dc3cb51 to your computer and use it in GitHub Desktop.
function multiplyByTwo (num) {
console.log(num + " multiplied by 2 is " + num*2)
}
// Syntax - setTimeout(callbackMethod, delay, param1, param2, ..)
setTimeout(multiplyByTwo, 100, 4)
// Output:
// 4 multiplied by 2 is 8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment