chore(curriculum): replace question in JS Higher Order Functions Quiz (#61280)

Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
This commit is contained in:
Giftea ☕ 2025-07-12 11:36:50 +01:00 committed by GitHub
parent fda816360e
commit 4b1f1ac25f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -409,31 +409,28 @@ filteredArray[0].id = 4;
#### --text--
What would be the output of the following code?
What will be the value of `shortWords` after the following code is run?
```js
const multiply = (a) => (b) => a * b;
const operations = [multiply(2), multiply(3)];
const result = operations.reduce((acc, fn) => fn(acc), 5);
console.log(result);
const words = ['apple', 'banana', 'pear', 'kiwi'];
const shortWords = words.filter(word => word.length <= 5);
```
#### --distractors--
`10`
`[]`
---
`100`
`['pear', 'kiwi']`
---
`20`
`['apple', 'banana']`
#### --answer--
`30`
`['apple', 'pear', 'kiwi']`
### --question--