|
|
|
|
|
by django77
1864 days ago
|
|
This is correct, but there are some guarantees such as the result will be an array of the same length, mapping function will be called for each element, function itself can be more easily tested in isolation and there are no imperative constructs (creating accumulator array outside of the scope, tracking the index, pushing to the accumulator array) This lends itself very nicely to functional programming (especially with typescript IMHO) |
|