From a9f4f11a77e4e4f44278525f38d249e067b994da Mon Sep 17 00:00:00 2001 From: Pixelposh Date: Thu, 22 Nov 2018 18:04:20 +0100 Subject: [PATCH] Added definitions to parameters (#22818) * Added definitions to parameters * Add formatting --- guide/english/javascript/es6/map-function/index.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/guide/english/javascript/es6/map-function/index.md b/guide/english/javascript/es6/map-function/index.md index 0a9ec81c28..188295dbf7 100644 --- a/guide/english/javascript/es6/map-function/index.md +++ b/guide/english/javascript/es6/map-function/index.md @@ -12,6 +12,11 @@ The original syntax of the map function is: // Do some stuff with currentValue (index and array are optionals) }) ``` +* `new_arr` - the new array that is returned +* `ar`r - the array to run the map function on +* `currentValue` - the current value being processed +* `index` - the current index of the value being processed +* `array` - the original array ### Example (ES6): @@ -21,4 +26,4 @@ const myArray_2 = myArray_1.map(el => el * 2); ``` `myArray_2` will contain the elements: `[2, 4, 6, 8]` -`map()` is a method of the `Array` object, so to pass that function to an iterable object it is necessary to make the object an Array. \ No newline at end of file +`map()` is a method of the `Array` object, so to pass that function to an iterable object it is necessary to make the object an Array.