0

It always leaves the last element as undefined. Am I not incrementing correctly?

function loopASequenceAgain(start, end) {
  for (var i = start; i < end; i++) {
    console.log(i);
  }
}

console.log(loopASequenceAgain(2, 5));
// console output:
// 2
// 3
// 4
// 5
Nick Parsons
  • 45,728
  • 6
  • 46
  • 64
rom feg
  • 11

0 Answers0