4

Switch(laptop){
Case weekdays: work
Case weekend: personal
}

Comments
  • 1
    Missing break's intended? 🤗 Work for personal 😂😂
  • 1
    @moagggi
    Depends on the language.
    In Go, Case-Breaks are implicit.
  • 1
    @metamourge Well I'm just used to C, C# and derived ones, where it's important to have breaks written and for me it feels like there's something missing 🤗😂 I hope this GOes okay for you 😉
  • 2
    @moagggi
    I C what you did there.😂
  • 0
    Thats why I have two laptops, its annoying having one for everything
  • 1
    Match statements are superior.

    let laptop = match weekday {
    Monday...Friday => Work,
    Saturday...Sunday => Personal,
    };
Add Comment