5 remove 'return'; braces are required if return is here. also x should be v edit approved Mar 29 at 17:03 0TTT0 10333 bronze badges Spread operator ... The spread operator transforms an array value into a comma separated list. Use case 1: Directly use an array where a function expects a list list=[1,2,3] x=Math.min(...list) list=[10,20], a.push(...list) // similar to concat()  Use case 2: Create an array literal from an iterable (typically a string) [...'buzzfizz'] // -> same as .split('')  Use case 3: Declare a variable number of arguments for a function F=(...x) => return x.map(v => x+1v+1) // example: F(1,2,3) == [2,3,4]  See mozilla doc Spread operator ... The spread operator transforms an array value into a comma separated list. Use case 1: Directly use an array where a function expects a list list=[1,2,3] x=Math.min(...list) list=[10,20], a.push(...list) // similar to concat()  Use case 2: Create an array literal from an iterable (typically a string) [...'buzzfizz'] // -> same as .split('')  Use case 3: Declare a variable number of arguments for a function F=(...x) => return x.map(v => x+1) // example: F(1,2,3) == [2,3,4]  See mozilla doc Spread operator ... The spread operator transforms an array value into a comma separated list. Use case 1: Directly use an array where a function expects a list list=[1,2,3] x=Math.min(...list) list=[10,20], a.push(...list) // similar to concat()  Use case 2: Create an array literal from an iterable (typically a string) [...'buzzfizz'] // -> same as .split('')  Use case 3: Declare a variable number of arguments for a function F=(...x) => x.map(v => v+1) // example: F(1,2,3) == [2,3,4]  See mozilla doc 4 deleted 4 characters in body edited Oct 1 '17 at 13:50 edc65 30.8k33 gold badges2727 silver badges8484 bronze badges Spread operator ... The spread operator transforms an array value into a comma separated list. Use case 1: Directly use an array where a function expects a list values=[1list=[1,2,3] x=Math.min(...valueslist) a=[10list=[10,20], a.push(...valueslist) // similar to concat()  Use case 2: Create an array literal from an iterable (typically a string) [...'buzzfizz'] // -> same as .split('')  Use case 3: Declare a variable number of arguments for a function F=(...x) => return x.map(v => x+1) // example: F(1,2,3) == [2,3,4]  See mozilla doc Spread operator ... The spread operator transforms an array value into a comma separated list. Use case 1: Directly use an array where a function expects a list values=[1,2,3] x=Math.min(...values) a=[10,20], a.push(...values) // similar to concat()  Use case 2: Create an array literal from an iterable (typically a string) [...'buzzfizz'] // -> same as .split('')  Use case 3: Declare a variable number of arguments for a function F=(...x) => return x.map(v => x+1) // example: F(1,2,3) == [2,3,4]  See mozilla doc Spread operator ... The spread operator transforms an array value into a comma separated list. Use case 1: Directly use an array where a function expects a list list=[1,2,3] x=Math.min(...list) list=[10,20], a.push(...list) // similar to concat()  Use case 2: Create an array literal from an iterable (typically a string) [...'buzzfizz'] // -> same as .split('')  Use case 3: Declare a variable number of arguments for a function F=(...x) => return x.map(v => x+1) // example: F(1,2,3) == [2,3,4]  See mozilla doc 3 added 151 characters in body edited Oct 1 '17 at 9:34 edc65 30.8k33 gold badges2727 silver badges8484 bronze badges Spread operator ... The spread operator transforms an array value into a comma separated list. Use case 1: Directly use an array where a function expects a list values=[1,2,3] x=Math.min(...values) a=[10,20], a.push(...values) // similar to concat()  Use case 2: Create an array literal from an iterable (typically a string) [...'buzzfizz'] // -> same as .split('')  Use case 3: Declare a variable number of arguments for a function F=(...x) => return x.map(v => x+1) // example: F(1,2,3) == [2,3,4]  See mozilla doc Spread operator ... The spread operator transforms an array value into a comma separated list. Use case 1: Directly use an array where a function expects a list values=[1,2,3] x=Math.min(...values) a=[10,20], a.push(...values) // similar to concat()  Use case 2: Create an array literal from an iterable (typically a string) [...'buzzfizz'] // -> same as .split('')  See mozilla doc Spread operator ... The spread operator transforms an array value into a comma separated list. Use case 1: Directly use an array where a function expects a list values=[1,2,3] x=Math.min(...values) a=[10,20], a.push(...values) // similar to concat()  Use case 2: Create an array literal from an iterable (typically a string) [...'buzzfizz'] // -> same as .split('')  Use case 3: Declare a variable number of arguments for a function F=(...x) => return x.map(v => x+1) // example: F(1,2,3) == [2,3,4]  See mozilla doc Mod Removes Wiki by Doorknob♦ occurred Feb 20 '15 at 2:52 2 added 1 character in body edited Sep 12 '14 at 17:38 William Barbosa 2,95922 gold badges1515 silver badges4141 bronze badges 1 answered Sep 12 '14 at 16:55 edc65 30.8k33 gold badges2727 silver badges8484 bronze badges