%%js
// CODE_RUNNER: Make a nested conditional homework
const NUMBERS = [
1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, 45, 46, 47, 48, 49, 50
];
for (let number of NUMBERS) {
if (number % 2 === 0) {
console.log(number + " is divisible by 2");
if (number % 5 === 0) {
console.log(number + " is divisible by 5");
if (number % 10 === 0) {
console.log(number + " is divisible by 10");
if (number % 25 === 0) {
console.log(number + " is divisible by 25");
if (number % 50 === 0) {
console.log(number + " is divisible by 50");
}
}
}
}
} else {
console.log(number + " is not divisible by a factor of 10");
}
}