Shorter version (which actually checks for 0⁰ × 1¹ × 2² × 3³ × 4⁴ × 5⁵):
> [0, 1, 2, 3, 4, 5].map(Math.pow).reduce((a, b) => a * b) === 1000 * 60 * 60 * 24
true
> [0, 1, 2, 3, 4, 5].map(Math.pow).reduce((a, b) => a * b) === 1000 * 60 * 60 * 24
true
5**5*4**4*3**3*2**2*1**1===24*60*60*1000
true 864e5 === 24 * 60 * 60 * 1000 864e5; a=1;for(i=1;i<=5;i++)a*=Math.pow(i,i);a === 1000 * 60 * 60 * 24
a=1;i=1;while(i++<5)a*=Math.pow(i,i);a === 1000 * 60 * 60 * 24