Timeline for Remove element from array (splice)
Current License: CC BY-SA 3.0
11 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Mar 28, 2018 at 8:17 | comment | added | Marek Marczak | in place should be bolded ;) | |
| Sep 29, 2016 at 18:03 | vote | accept | Paulos3000 | ||
| Sep 29, 2016 at 18:03 | comment | added | Paulos3000 | Felix's solution is fine, just surprised there isn't a method that returns the reduced array in one. I've got a list of contacts, I wanted to click a 'remove contact' button that removes that object from the array. So, I want the original array altered accordingly. In the end I just removed it first, and then accessed the original array. | |
| Sep 29, 2016 at 17:55 | history | edited | Felix Kling | CC BY-SA 3.0 |
added 279 characters in body
|
| Sep 29, 2016 at 17:55 | comment | added | Rayon | – Yeah! Very much possible... :) | |
| Sep 29, 2016 at 17:54 | comment | added | Felix Kling | @Rayon: Well, they say they want that a function that returns the array. There could be use cases where something like this makes sense. | |
| Sep 29, 2016 at 17:52 | comment | added | Rayon | I thought that is the first thing to suggest.. If he is asking, he does/may not know how it is... | |
| Sep 29, 2016 at 17:52 | comment | added | Felix Kling | @Rayon: Ask the OP ;) But yeah, maybe they didn't know about that, let me clarify that. | |
| Sep 29, 2016 at 17:51 | history | edited | Felix Kling | CC BY-SA 3.0 |
added 86 characters in body
|
| Sep 29, 2016 at 17:50 | comment | added | Rayon |
arr is updated array right ? Why not just use it ?
|
|
| Sep 29, 2016 at 17:48 | history | answered | Felix Kling | CC BY-SA 3.0 |