From fe00a8f959fc8fa7ead08bc663999312272bf08e Mon Sep 17 00:00:00 2001 From: Krishna Vishwakarma Date: Wed, 14 Nov 2018 02:14:51 +0530 Subject: [PATCH] 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 --- .../javascript/es6/every-function/index.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 guide/english/javascript/es6/every-function/index.md diff --git a/guide/english/javascript/es6/every-function/index.md b/guide/english/javascript/es6/every-function/index.md new file mode 100644 index 00000000000..db9f6c24338 --- /dev/null +++ b/guide/english/javascript/es6/every-function/index.md @@ -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