Post History
JavaScript, 31 bytes Outputs 0 for falsey and a non-zero value for truthy. If the 2 values must be consistent then replace the last * with && to output true instead. n=>(g=d=>d++&...
Answer
#2: Post edited
- # JavaScript, 31 bytes
- Outputs `0` for falsey and a non-zero value for truthy. If the 2 values must be _consistent_ then replace the last `*` with `&&` to output `true` instead.
- <!-- language-all: lang-javascript -->
- n=>(g=d=>d++>n||n%d**2*g(d))(1)
[Try it online!](n=>(g=d=>d++>n||n%d**2*g(d))(1))
- # JavaScript, 31 bytes
- Outputs `0` for falsey and a non-zero value for truthy. If the 2 values must be _consistent_ then replace the last `*` with `&&` to output `true` instead.
- <!-- language-all: lang-javascript -->
- n=>(g=d=>d++>n||n%d**2*g(d))(1)
- [Try it online!](https://tio.run/##JcnNCoJAFIbhfVcxgcE5@hVz/OlnMe66gpYRKI1KETNhEoJ17Wa1eDfvcy2f5ePcXu7d0nlbjbUZncmpMdbkNopy93q5hQ3DOGzIMpPwWPuWeuVrdRTESJAiwxobbLGDaEgMSSFryBaxRqKRamTT11NfFznx7Ozdw9@q1c03VARD/y5W99IeurLtKOGoUEYFwwTzeU09/3XvLGX8VhQMv8kFjx8)
#1: Initial revision
# JavaScript, 31 bytes Outputs `0` for falsey and a non-zero value for truthy. If the 2 values must be _consistent_ then replace the last `*` with `&&` to output `true` instead. <!-- language-all: lang-javascript --> n=>(g=d=>d++>n||n%d**2*g(d))(1) [Try it online!](n=>(g=d=>d++>n||n%d**2*g(d))(1))