• Skyline969@lemmy.ca
    link
    fedilink
    English
    arrow-up
    65
    arrow-down
    1
    ·
    edit-2
    1 year ago

    Wow. Amateur hour over here. There’s a much easier way to write this.

    A case select:

    select(number){
        case 1:
            return false;
        case 2:
            return true;
    }
    

    And so on.