Lines Matching defs:const
16 const array1 = [1, 2, 3, 4];
17 const initialValue = 0;
18 const sumWithInitial = array1.reduce(
23 const objects = [{ x: 1 }, { x: 2 }, { x: 3 }];
24 const sum = objects.reduce(
31 const arrayLike = {
38 const myArray = ["a", "b", "a", "b", "c", "e", "e", "c", "d", "d", "d", "d"];
39 const myArrayWithNoDuplicates = myArray.reduce((accumulator, currentValue) => {
47 const numbers = [-5, 6, 2, 0];
49 const doubledPositiveNumbers = numbers.reduce((accumulator, currentValue) => {
51 const doubled = currentValue * 2;
88 const promiseArr = [p1, p2, f3, p4];