diff --git a/challenges/02-javascript-algorithms-and-data-structures/es6.json b/challenges/02-javascript-algorithms-and-data-structures/es6.json index 6982417ed3..e2dc572582 100644 --- a/challenges/02-javascript-algorithms-and-data-structures/es6.json +++ b/challenges/02-javascript-algorithms-and-data-structures/es6.json @@ -414,24 +414,24 @@ "
FBPosts.filter((post) => post.thumbnail !== null && post.shares > 100 && post.likes > 500)
", "This code is more succinct and accomplishes the same task with fewer lines of code.", "
", - "Use arrow function syntax to compute the square of only the positive integers (fractions are not integers) in the array realNumberArray and store the new array in the variable squaredIntegers." + "Use arrow function syntax to compute the square of only the positive integers (decimal numbers are not integers) in the array realNumberArray and store the new array in the variable squaredIntegers." ], "tests": [ { - "text": "User did replace var keyword.", - "testString": "getUserInput => assert(!getUserInput('index').match(/var/g), 'User did replace var keyword.');" - }, - { - "text": "squaredIntegers should be a constant variable (by using const).", - "testString": "getUserInput => assert(getUserInput('index').match(/const\\s+squaredIntegers/g), 'squaredIntegers should be a constant variable (by using const).');" + "text": + "squaredIntegers should be a constant variable (by using const).", + "testString": + "getUserInput => assert(getUserInput('index').match(/const\\s+squaredIntegers/g), 'squaredIntegers should be a constant variable (by using const).');" }, { "text": "squaredIntegers should be an array", "testString": "assert(Array.isArray(squaredIntegers), 'squaredIntegers should be an array');" }, { - "text": "squaredIntegers should be [16, 1764, 36]", - "testString": "assert(squaredIntegers[0] === 16 && squaredIntegers[1] === 1764 && squaredIntegers[2] === 36, 'squaredIntegers should be [16, 1764, 36]');" + "text": + "squaredIntegers should be [16, 1764, 36]", + "testString": + "assert.deepStrictEqual(squaredIntegers, [16, 1764, 36], 'squaredIntegers should be [16, 1764, 36]');" }, { "text": "function keyword was not used.", @@ -455,7 +455,7 @@ "ext": "js", "name": "index", "contents": [ - "const realNumberArray = [4, 5.6, -9.8, 3.14, 42, 6, 8.34];", + "const realNumberArray = [4, 5.6, -9.8, 3.14, 42, 6, 8.34, -2];", "const squareList = (arr) => {", " \"use strict\";", " // change code below this line",