Last active
March 15, 2020 10:40
-
-
Save bobzhen/417d446a16b457df1f50f3251ec9bf5b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const xor = array => { | |
if (Array.from(array).every(a => !!a)) return false | |
const someEmpty = Array.from(array).some(a => !a) | |
const somePresent = Array.from(array).some(a => !!a) | |
return someEmpty && somePresent | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment