Post History
JavaScript, 20 bytes Outputs false for truthy and true for falsey. a=>a.some(x=>x-a[0]) Try it online! Outputs true and false as normal. a=>new Set(a).size<2 Try it online!
Answer
#3: Post edited
# JavaScript (Node.js), 20 bytes- Outputs `false` for truthy and `true` for falsey.
- <!-- language-all: lang-javascript -->
- a=>a.some(x=>x-a[0])
[Try it online!](https://tio.run/##y0osSyxOLsosKNHNy09J/Z9m@z/R1i5Rrzg/N1WjwtauQjcx2iBW839yfl5xfk6qXk5@uoZimka0oQ4UxmpqcqFLGoClzHTMsUmCdPwHAA)
- # JavaScript, 20 bytes
- Outputs `false` for truthy and `true` for falsey.
- <!-- language-all: lang-javascript -->
- a=>a.some(x=>x-a[0])
- [Try it online!](https://tio.run/##y0osSyxOLsosKNHNy09J/Z9m@z/R1i5Rrzg/N1WjwtauQjcx2iBW839yfl5xfk6qXk5@uoZimka0oQ4UxmpqcqFLGoClzHTMsUmCdPwHAA)
- Outputs `true` and `false` as normal.
- a=>new Set(a).size<2
- [Try it online!](https://tio.run/##y0osSyxOLsosKNHNy09J/Z9m@z/R1i4vtVwhOLVEI1FTrzizKtXG6H9yfl5xfk6qXk5@ukaaRrShDhTGampyockZgGXMdMyxyIHU/wcA)
#2: Post edited
- # JavaScript (Node.js), 20 bytes
- Outputs `false` for truthy and `true` for falsey.
- <!-- language-all: lang-javascript -->
- a=>a.some(x=>x-a[0])
[Try it online!](https://tio.run/##y0osSyxOLsosKNHNy09J/Z9m@z/R1i5Rrzg/N1WjwtauQjcx2iBW839yfl5xfk6qXk5@uoZimka0oQ4UxmpqcmFKGukY65jomAIl/wMA) (output is flipped in the footer for easier vaerification)
- # JavaScript (Node.js), 20 bytes
- Outputs `false` for truthy and `true` for falsey.
- <!-- language-all: lang-javascript -->
- a=>a.some(x=>x-a[0])
- [Try it online!](https://tio.run/##y0osSyxOLsosKNHNy09J/Z9m@z/R1i5Rrzg/N1WjwtauQjcx2iBW839yfl5xfk6qXk5@uoZimka0oQ4UxmpqcqFLGoClzHTMsUmCdPwHAA)
#1: Initial revision
# JavaScript (Node.js), 20 bytes Outputs `false` for truthy and `true` for falsey. <!-- language-all: lang-javascript --> a=>a.some(x=>x-a[0]) [Try it online!](https://tio.run/##y0osSyxOLsosKNHNy09J/Z9m@z/R1i5Rrzg/N1WjwtauQjcx2iBW839yfl5xfk6qXk5@uoZimka0oQ4UxmpqcmFKGukY65jomAIl/wMA) (output is flipped in the footer for easier vaerification)