Skip to content

rename ES.70 to ES.77 and add breaks to the example. #574

Open
@borissmidt

Description

@borissmidt

ES.70: Prefer a switch-statement to an if-statement when there is a choice:
The example is misses break; between every case this means that it cannot be compared to the if else example. since it will use a fall through

The next 7 Paragraphs talk about loops and goto and then back to switch, moving ES 70 to 77 will make the switch rules grouped together.

I also have a small curiosity what are the rules of a duff device? i.e. mixing a loop and switch case, should this be avoided at all cost, e.g. scream and pull hair out?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions