有什麼辦法在JS中使用布爾代數?在JavaScript中的布爾代數
例如我想循環遍歷一個包含真的& false的數組,並將其簡化爲true或false。
與布爾代數做這似乎是一種優雅的方式來做到這一點...
[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
你的意思是和他們在一起嗎? – n8wrl