Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

practice problems - squareEvenNumbers wording #1

Open
stocktons opened this issue Jun 7, 2022 · 0 comments · May be fixed by #2
Open

practice problems - squareEvenNumbers wording #1

stocktons opened this issue Jun 7, 2022 · 0 comments · May be fixed by #2

Comments

@stocktons
Copy link
Contributor

stocktons commented Jun 7, 2022

(this proposed fix has been approved by @joelburton on the corresponding file in curric)

Some people are reporting a bug due to nebulous wording in our directions.

Current directions read:

Write a function called squareEvenNumbers which accepts an array and returns the sum of all of the even numbers in the array squared.

Which could lead people to think they should add up the evens, and then square the result. So with this example, they'd get 36 instead of 20:

squareEvenNumbers([1, 2, 3, 4, 5]); // 20

Propose re-writing the directions to:

“…returns the sum of the squares of all the even numbers in the array.”
@stocktons stocktons linked a pull request Jun 7, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant