0

function iqTest(numbers) {
  const split = numbers.split(" ");

  split.forEach((l, index) => {
    if (l % 2 === 0) {
      return index + 1;
    }
  })
}

This is from a CodeWars question. I reckon it looks like the return is missed in the anon function.. but why is that so?

ellipsis
  • 12,049
  • 2
  • 17
  • 33
Mike K
  • 7,621
  • 14
  • 60
  • 120

0 Answers0