Skip to content

improve "else" example #450

@Daniel-1276

Description

@Daniel-1276

Affected document:
https://github.com/arduino/reference-en/blob/master/Language/Structure/Control%20Structure/else.adoc

Issue:
IMHO "&& temperature < 70" in condition2 is unnecessary.

Explanation:
condition1 is "true" if value is above "70". In this example all other "else" or "else if" conditions get ignored.
if value is below "70" first condition is "false" and second condition gets checked. This means already value is below 70 and must not be checked again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions