Tengo esta posible solución.
<!DOCTYPE html>
<html>
<head>
<title>Print Even Numbers</title>
</head>
<body>
<h1>Even Numbers</h1>
<ul id="evenNumbersList"></ul>
<script>
function printEvenNumbers() {
let evenNumbersList = document.getElementById("evenNumbersList");
let number = 1;
while (number <= 100) {
if (number % 2 === 0) {
let listItem = document.createElement("li");
listItem.textContent = number;
evenNumbersList.appendChild(listItem);
}
number++;
}
let endItem = document.createElement("li");
endItem.textContent = "FIN";
evenNumbersList.appendChild(endItem);
}
printEvenNumbers();
</script>
</body>
</html>