this post was submitted on 14 Jan 2024
5 points (85.7% liked)

Learn Programming

1631 readers
1 users here now

Posting Etiquette

  1. Ask the main part of your question in the title. This should be concise but informative.

  2. Provide everything up front. Don't make people fish for more details in the comments. Provide background information and examples.

  3. Be present for follow up questions. Don't ask for help and run away. Stick around to answer questions and provide more details.

  4. Ask about the problem you're trying to solve. Don't focus too much on debugging your exact solution, as you may be going down the wrong path. Include as much information as you can about what you ultimately are trying to achieve. See more on this here: https://xyproblem.info/

Icon base by Delapouite under CC BY 3.0 with modifications to add a gradient

founded 1 year ago
MODERATORS
 

The switch statement is an alternative to if/else conditional construct (commonly called a "case statement") and may make the program more readable when handling multiple options.

top 6 comments
sorted by: hot top controversial new old
[–] [email protected] 2 points 10 months ago (1 children)

The code shown contains an error. Instead of multiply by seven, you probably mean divide by seven.

Faulty code example: Math.floor((Math.random()* 7)+1)

[–] [email protected] 1 points 10 months ago (1 children)

thank you for the comment. but it would be very gratifying if this comment were left on the site. it would help our work to grow

[–] [email protected] 2 points 10 months ago* (last edited 10 months ago) (1 children)

That would require another account but I'm reluctant to create one since:

  • no privacy policy
  • no legal info who runs the site
  • given the first two points the "risk"-reward does not balance

Risk is in quotes since it's more of a "why bother?" than "oh no my info got stolen"

[–] [email protected] 1 points 10 months ago (1 children)

we have the policies here https://chat-to.dev/privacy, you must have entered by cell phone

[–] [email protected] 2 points 10 months ago (1 children)

Indeed, I've visited via Mobile. So with tongue in cheek: "are mobile users not entitled to those informations?" :D

[–] [email protected] 1 points 9 months ago

Actually, there is, since it's a new site, we're working on all this, and we apologize in advance.