#JavaScript (ES6), 29 bytes <!-- language-all: lang-javascript --> a=>a.map(x=>m>>=x&1,m=5)&&m&1 [Try it online!][TIO-k6ntplp1] [JavaScript (Node.js)]: https://nodejs.org [TIO-k6ntplp1]: https://tio.run/##bU7LCoMwELz3K3IKBlIhPmqkJD8iHoLV0mKM1FL8@zTZxKJQWHaXmd2ZeaqPWrrXY36fJ3Pr7SCsElKlWs3JKqSWUqyYUS1KgrHGzHZmWszYp6O5J02TUVRA5a5aijyQ@cncBNRxF4p45AqAD90zPBwBEN4YiyqgytsWEg2EXE/HBHuj0slEI3irfas2VcgVTCu/5iF1vP3puGXzZqC6AU7oT@2S2S8 "JavaScript (Node.js) – Try It Online" ###How? We start with the bitmask \$m=101_2=5_{10}\$ and right-shift it by one position for each odd value in the input array. The final result is given by the parity of \$m\$.