Answers for "add a sequence of 6 different numbers together javascript"

0

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

Code answers related to "add a sequence of 6 different numbers together javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language