• + 1 comment

    You're right, why x <= 100? Excution time may be reduced using max = Math.max(...b) instead of 100 ...

    for x > max => b.every(int => (int % x == 0)) return false