Skip to content

Chapter 6: Control Flow #22

@sbromberger

Description

@sbromberger

"Value truthiness" - everything here is correct, but perhaps this should be explained:

julia> true * 6
6

julia> true + 8
9

julia> false + 8
8

julia> true + 64.7
65.7

julia> 6 + (true)im
6 + 1im

(That is, true evaluates in numerical contexts to 1, and false to 0.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions