Solución usando un for loop:
<script>
function numerosParesHasta100() {
for (let i = 0; i <= 100; i += 2) {
document.write(i);
document.write('<br />')
}
document.write('FIN');
}
numerosParesHasta100();
</script>