Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

reduce in js

let x = [1, 2, 3]; // 2 % 2 == 0
let v = x.reduce(e => e % 2 == 0);
console.log(v) // true 
//reduce return true or false
Source by jsbin.com #
 
PREVIOUS NEXT
Tagged: #reduce #js
ADD COMMENT
Topic
Name
4+9 =