Skip to content

Instantly share code, notes, and snippets.

@AFelipeTrujillo
Created July 16, 2015 22:43
Show Gist options
  • Save AFelipeTrujillo/961633a7e98bb06f3d88 to your computer and use it in GitHub Desktop.
Save AFelipeTrujillo/961633a7e98bb06f3d88 to your computer and use it in GitHub Desktop.
Diferentes funciones útiles para Javascript
//Pull an element from array by its name
//Eliminar un elemento desde un array por el nombre
function pullByName(name,array){
var i = array.indexOf(name);
if(i != -1) {
array.splice(i, 1);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment