zwgjkq
Last Updated: September 20, 2018
·
1.361K
· av-ast

Javascript analogue of Ruby's "any?"

[true, true].every(Boolean)
true

[true, true, false].every(Boolean)
false

[true, true, null].every(Boolean)
false

[true, true, ""].every(Boolean)
false

[].every(Boolean)
true

4 Responses
Add your response

2011

Hey, man, look here http://underscorejs.org/#any
;) Also a good thing, right?

over 1 year ago ·
2120

Yep. Underscore.js rules!
But this pro tip is just for plain JavaScript.

over 1 year ago ·
30212

We appreciate you for sharing such useful post. Check out http://writemypaper.com.au/ for your essay writing services needs in the future.

3 months ago ·
30748

If you are searching for windows 10 apps then you get tutorial for windows 10 at http://allprogramswindows10.com/

19 days ago ·