javascript-exercises icon indicating copy to clipboard operation
javascript-exercises copied to clipboard

JS exercises solutions - removeFromArray: Make `array` an independent parameter

Open yossirise opened this issue 3 years ago • 0 comments

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 change format, 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 array would 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:

yossirise avatar May 28 '22 20:05 yossirise