Update 09_day_higher_order_functions.md

Added example list to the code example for the some() function, also corrected the comments on the code example
pull/791/head
evabth 2 years ago committed by GitHub
parent 55d8e3dbc0
commit 0647ce59a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -480,7 +480,8 @@ console.log(areSomeTrue) //true
```
```js
const areAllStr = names.some((name) => typeof name === 'number') // Are all strings ?
const names = ['Asabeneh', 'Mathias', 'Elias', 'Brook']
const areAllStr = names.some((name) => typeof name === 'number') // Are some numbers?
console.log(areAllStr) // false
```

Loading…
Cancel
Save