Skip to content

Instantly share code, notes, and snippets.

@rokity
Last active September 5, 2017 06:41
Show Gist options
  • Save rokity/b8baeaf5f89a450e56c81b749ba6e80a to your computer and use it in GitHub Desktop.
Save rokity/b8baeaf5f89a450e56c81b749ba6e80a to your computer and use it in GitHub Desktop.
requirebin sketch
// Welcome! require() some modules from npm (like you were using browserify)
// and then hit Run Code to run your code on the right side.
// Modules get downloaded from browserify-cdn and bundled in your browser.
var numbers = [1,2,3];
numbers.forEach(
(item,index,array)=>
{
//iterate-function
if(array.length-1==index)
{
//then-function or
//callback to then-function
}
});
setTimeout(function(){
;// Welcome! require() some modules from npm (like you were using browserify)
// and then hit Run Code to run your code on the right side.
// Modules get downloaded from browserify-cdn and bundled in your browser.
var numbers = [1,2,3];
numbers.forEach(
(item,index,array)=>
{
//iterate-function
if(array.length-1==index)
{
//then-function or
//callback to then-function
}
});
;}, 0)
{
"name": "requirebin-sketch",
"version": "1.0.0",
"dependencies": {
"foreach-then": "1.0.4"
}
}
<!-- contents of this file will be placed inside the <body> -->
<!-- contents of this file will be placed inside the <head> -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment