garageScript / curriculum

GarageScript Curriculum
21 stars 164 forks source link

JS3 Problem 4: Duplicate values in test case #347

Closed Oroul closed 3 years ago

Oroul commented 4 years ago

The description for this problem is:

Write a function that takes in an array of numbers and a number, and returns true if any pairs add up to the number. (The numbers in the array is unique, meaning there will be no duplicate numbers) solution([1,2,22,333,23], 25) // returns true solution([1,2,22,333,23], 24) // returns true

However, the last test case tests the input [0, 0, 0], 0, all duplicate values.

Is the test case wrong, or is the description wrong for this problem?

songz commented 3 years ago

description is wrong.

SlyBouhafs commented 3 years ago

Looks like this issue has already been solved.

Here's a screenshot as a reference:

Screen Shot 2020-09-13 at 23 35 28

SlyBouhafs commented 3 years ago

I did a pull request here #355 so that the description in js3/4.js matches the one on the website.