2016-12-05 22:15:40 +01:00
|
|
|
;Task:
|
2015-02-20 00:35:01 -05:00
|
|
|
Select certain elements from an Array into a new Array in a generic way.
|
2016-12-05 22:15:40 +01:00
|
|
|
|
|
|
|
|
|
2015-02-20 00:35:01 -05:00
|
|
|
To demonstrate, select all even numbers from an Array.
|
2013-04-10 21:29:02 -07:00
|
|
|
|
2015-02-20 00:35:01 -05:00
|
|
|
As an option, give a second solution which filters destructively,
|
|
|
|
|
by modifying the original Array rather than creating a new Array.
|
2016-12-05 22:15:40 +01:00
|
|
|
<br><br>
|