Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- > Hi everyone,
- > I am trying to figure out how to remove part of an ID from an array item?
- > Thanks for the help!
- @jen188#6518
- `let array = ['ID1', 'ID2'];
- let index = 0
- let id = array[index];
- id = id.substring(0,2)
- array[index] = id`
- Look here if yoy have a question about the `id.substring` part: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring
- I hope I could help you!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement