Skip to content

If expressions (a la Rust) #10

@Vorlias

Description

@Vorlias
# shorthand
let example = if value: "Hello, I'm true"

Shorthand would evaluate to "Hello, I'm true" (if true) or undefined

# longhand
let example = if value {
    "Hello, I'm true!"
} else {
    "Hello, I'm false!"
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions