Can someone point me in the way towards some documentation as to what it means to use !!. I have a return statement
return !! _.reduce(collection, function(a, b){
// a is a result of last call
// b is result of calling iterator on current value
console.log("a: "+a)
console.log("b: "+b)
console.log(iterator(b));
//will return false or true based on test
return a && iterator(b);
}, true)
}
which works but this doesn't
return _.reduce(collection, function(a, b){
// a is a result of last call
// b is result of calling iterator on current value
console.log("a: "+a)
console.log("b: "+b)
console.log(iterator(b));
//will return false or true based on test
return a && iterator(b);
}, true)
}