Created
November 21, 2015 06:02
-
-
Save edinsoncs/cef1e982c5bddb1111e2 to your computer and use it in GitHub Desktop.
elevent
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
/*shift*/ | |
/*Shift borraremos*/ | |
function shiftFn(arr) { | |
var a = arr; | |
var result = a; | |
var int = setInterval(function(){ | |
result.shift(); | |
console.log('eliminando con shift ' + result.shift()); | |
var u = undefined; | |
var x = result.shift(); | |
var s = "STOP..." | |
if(x == u) { | |
console.log("no tengo mas que mostrar: " + s + "!!!"); | |
clearInterval(int); | |
} | |
}, 2000); | |
//return result; | |
} | |
shiftFn(['hola','que tal', 'como estan', 'todo bien', 'genial', 'javascript', 'i love you', 'developer']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment