Définition
let f = ([a, b] = [10, 10], {x: c} = {x: a - b}) => a + b + c;Paramètres
f([2,3],{x:10});
f = ([a, b], {x: c}) => a + b + c;
// 15 = 2 + 3 + 10
Paramètres
f([2,3]);([a, b], {x: c} = {x: a - b}) => a + b + c;
// 4 = 2 + 3 + ( 2 - 3 )
Paramètres
f();f = ([a, b] = [10, 10], {x: c} = {x: a - b}) => a + b + c;
// 20 = 10 + 10 + ( 10 - 10 )