This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
array_1 = [1, 2, 3, 4, 5, 6] | |
array_2 = [7, 8, 9, 10] | |
array_3 = zip(array_1, array_2) | |
array_3 = //[[1,7],[2,8],[3, 9],[4,10]] | |
//OR | |
//[[1,7],[2,8],[3, 9],[4,10],[5,undefined],[6,undefined]] | |
//OR | |
//ERROR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Or, if you don't want messy code every time, just define an instaInterval function | |
function instaInterval(f, t) { | |
return (function() { | |
f(); | |
return setInterval(f, t); | |
}); | |
} | |
//And now create executable intervals on the fly | |
var interval = instaInterval(function() { |