1.8 KiB
1.8 KiB
id | title | challengeType |
---|---|---|
587d7b84367417b2b2512b36 | Catch Unclosed Parentheses, Brackets, Braces and Quotes | 1 |
Description
Instructions
Tests
tests:
- text: Your code should fix the missing piece of the array.
testString: assert(code.match(/myArray\s*?=\s*?\[\s*?1\s*?,\s*?2\s*?,\s*?3\s*?\];/g), 'Your code should fix the missing piece of the array.');
- text: 'Your code should fix the missing piece of the <code>.reduce()</code> method. The console output should show that "Sum of array values is: 6".'
testString: 'assert(arraySum === 6, ''Your code should fix the missing piece of the <code>.reduce()</code> method. The console output should show that "Sum of array values is: 6".'');'
Challenge Seed
let myArray = [1, 2, 3;
let arraySum = myArray.reduce((previous, current => previous + current);
console.log(`Sum of array values is: ${arraySum}`);
Solution
// solution required