Sasha12312321,
<script>
let number = prompt("Введите число!");
if (!number || typeof +number !== "number" || isNaN(+number)) {
alert("Sorry, no numbers");
} else
for (let i = 0; i <= +number; ++i) {
if (i % i === 0) {
if (i % 5 == 0) {
document.write(`${i}<br>`);
}
}
}
</script>