mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-02 02:01:39 -05:00
fix(curriculum): Odin Loops and Arrays G missing brace (#56680)
Co-authored-by: Krzysztof G. <60067306+gikf@users.noreply.github.com>
This commit is contained in:
@@ -18,7 +18,7 @@ const newArray = array.map((arrayValue) => {
|
||||
console.log(newArray); // Output: [2, 4, 6, 8, 10]
|
||||
```
|
||||
|
||||
The `map()` method creates a new array by applying the function `(arrayValue) => { return arrayValue * 2;` to each element of the original array. This is particularly useful when you want to transform the elements of an array without changing the original array.
|
||||
The `map()` method creates a new array by applying the function `(arrayValue) => { return arrayValue * 2; }` to each element of the original array. This is particularly useful when you want to transform the elements of an array without changing the original array.
|
||||
|
||||
# --questions--
|
||||
|
||||
|
||||
Reference in New Issue
Block a user