javascript-exercises
javascript-exercises copied to clipboard
JS exercises solutions - removeFromArray: Make `array` an independent parameter
This spares us from having to extract array from args and is more idiomatic (I think).
Complete the following REQUIRED checkboxes:
- [x] I have thoroughly read and understand The Odin Project Contributing Guide
- [x] The title of this PR follows the
location of change: brief description of changeformat, e.g.01_helloWorld: Update test cases
Complete the following checkboxes ONLY IF they are applicable to your PR. You can complete them later if they are not currently applicable:
- [x] I have ensured any exercise files included in this PR have passed all of their tests
1. Because:
- A concise, idiomatic way to handle
arraywould be to declare it as an independent parameter rather than extract it from the argument list
2. This PR:
- Moves array to the parameter list and removes code made redundant
3. Additional Information: