Skip to content

The "switch" statement #108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Jun 25, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update solution.md
Add corrections to translation.
  • Loading branch information
odsantos authored Mar 19, 2020
commit 87215a5afeee8ed4ee08114b5ae601824057ac99
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Para executar precisamente a funcionalidade do `switch`, o `if` deve empregar uma comparação exata (*strict comparison*) `'==='`.
Para precisamente se equiparar à funcionalidade do `switch`, o `if` deve empregar uma comparação exata (*strict comparison*) `'==='`.

Contudo, para certas *strings* um simples `'=='` tanbém serve.

Expand All @@ -9,7 +9,7 @@ if(browser == 'Edge') {
|| browser == 'Firefox'
|| browser == 'Safari'
|| browser == 'Opera') {
alert( 'Esta bem, também suportamos esse navegador (browser).' );
alert( 'Está bem, também suportamos esse navegador (browser).' );
} else {
alert( 'Esperamos que esta página tenha uma boa apresentação!' );
}
Expand Down