Is it possible to use Boolean algebra in JS?
For example, I would like to skip an array containing true and false, and simplify it to only true or false.
Doing this with Boolean algebra seems like an elegant way to do it ...
[true,true,true,true] //would like to do a comparison that lets me //simply add the previous value to the current iteration of a loop // and have this return true [false,true,true,true]//this on the other hand should return false
source share