<script>
let sum = 0;
let sum2 = 0;
for (let i = 0; i<=1000; i++) {
if(i % 2 == 1) {
sum = sum + i;
} else if (i % 2 == 0){
sum2 = sum2 =i;
}
}
console.log(sum);
console.log(sum2);
</script>
<script>
let sum = 0;
let sum2 = 0;
for (let i = 0; i<=1000; i++) {
if(i % 2 == 1) {
sum = sum + i;
} else if (i % 2 == 0){
sum2 = sum2 =i;
}
}
console.log(sum);
console.log(sum2);
</script>