Skip to content

Instantly share code, notes, and snippets.

@hddananjaya
Last active December 16, 2019 03:36
Show Gist options
  • Save hddananjaya/babd4b5d7390d73193d937c92b4640c2 to your computer and use it in GitHub Desktop.
Save hddananjaya/babd4b5d7390d73193d937c92b4640c2 to your computer and use it in GitHub Desktop.
JS remove element from a given index.
/* arr - Array
index - int index to remove
*/
function rm_arr (arr, index){
arr.splice(index, 1);
return (arr);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment