add a sequence of 6 different numbers together javascript
const sequenceSum = (begin, end, step) => {
let sum = 0
for (let i = begin; i <= end; i += step) sum += i;
return sum
};
console.log(sequenceSum(2, 6, 2))
add a sequence of 6 different numbers together javascript
const sequenceSum = (begin, end, step) => {
let sum = 0
for (let i = begin; i <= end; i += step) sum += i;
return sum
};
console.log(sequenceSum(2, 6, 2))
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us