Answers for "javascript Sum of a sequence"

0

javascript Sum of a sequence

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))
Posted by: Guest on June-18-2020

Code answers related to "javascript Sum of a sequence"

Code answers related to "Javascript"

Browse Popular Code Answers by Language