While loop saves the day!
Or better yet ... use some functional programming!
.map((_, i) => i + 1)
.filter((num) => num % 2 !== 0)
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.