Standard built-ins
Iterator.prototype.every()
Consumes until a predicate is falsy, closing on early failure; true for an empty sequence.
Formal Syntax & Structure
javascript syntaxjavascript
iterator.every(predicate)Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| predicate | function | Test callback. |
Return Value
boolean
Result of the operation.
Working Example
Example Snippetjavascript
console.log(JSON.stringify(Iterator.from([1,2,3]).every(x=>x>0)));