Skip to content

Commit 4f0ef94

Browse files
authored
pay attention when using every
1 parent 45748db commit 4f0ef94

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

+21
Original file line numberDiff line numberDiff line change
@@ -862,3 +862,24 @@ const newState = state.map((obj) =>
862862
863863
864864
865+
**[⬆ Back to Top](#table-of-contents)**
866+
### pay attention when using every
867+
868+
Calling this method on an empty array will return true for any condition!
869+
870+
871+
```javascript
872+
873+
const arr = []
874+
const result = arr.every(x=> x==5)
875+
console.log(result) //true
876+
877+
```
878+
879+
880+
881+
882+
883+
884+
885+

0 commit comments

Comments
 (0)