this post was submitted on 14 Apr 2024
38 points (89.6% liked)

linuxmemes

20408 readers
961 users here now

I use Arch btw


Sister communities:

Community rules

  1. Follow the site-wide rules and code of conduct
  2. Be civil
  3. Post Linux-related content
  4. No recent reposts

Please report posts and comments that break these rules!

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 5 months ago

for(var i=0;i<=100;i++){ if((i%2)==1) console.log(i); }

btw % is the modulo operator, x%y returns the remainder of division of x by y