I'm doing an algorithm challenge on freecodecamp and I think is part of the process. If I details are needed I'll be happy to oblige.
Asked
Active
Viewed 17 times
0
-
`arr.splice;arr.length=0;` – Denys Séguret Jul 13 '17 at 15:03
-
`arr = []` would probably be more efficient (unless you actually need to mutate the array) – 4castle Jul 13 '17 at 15:04
-
emptying an array is very different from getting another one – Denys Séguret Jul 13 '17 at 15:05
-
Thanks for the help. I didn't realize that this question was already answered. – Original Name Jul 13 '17 at 15:22