Welcome to Incremental Social! Learn more about this project here!
Check out lemmyverse to find more communities to join from here!

LostXOR ,

Slightly simpler, start at 1 and increment by 2 so you don't have to check whether i is odd.

for (var i = 1; i < 100; i += 2) {
  console.log(i);
}
  • All
  • Subscribed
  • Moderated
  • Favorites
  • linuxmemes@lemmy.world
  • random
  • incremental_games
  • meta
  • All magazines