Skip to content

Instantly share code, notes, and snippets.

//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() {
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