Calculate the sum of numbers to :
let sum = 0
for (let i = 1; i <= 100; i++) {
sum += i
}
console.log(`Sum of 1 to 100: ${sum}`) // 5050
Try modifying this to:
Sum only even numbers
Sum only numbers divisible by
Find the product instead of sum