Add 'index.md' for Every Function in javascript (#27682)

* Add 'index.md' for Every Function in javascript

* Changed File name to 'every-function'

* fix: corrected frontmatter
pull/21433/head^2
Krishna Vishwakarma 2018-11-14 02:14:51 +05:30 committed by Randell Dawson
parent c8c4acd121
commit fe00a8f959
1 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,16 @@
---
title: Every Function
---
# Every Function in ES6
Every function returns true or false if a given array passes the criteria.
```
let number = [1, 2, -1, -3, 0];
number.every((value) => value >= 0 );
```
Would give the result true if the array has a value 0 or greater than 0.
For more information, please visit https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every