scrimba
Learn Basic JavaScript
Selecting from Many Options with Switch Statements
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Selecting from Many Options with Switch Statements
AboutCommentsNotes
Selecting from Many Options with Switch Statements
Expand for more info
index.js
run
preview
console
function caseInSwitch(val) {
var answer = "";


return answer;
}

// Change this value to test
caseInSwitch(1);

/*
Write a switch statement which tests val and sets answer for the following conditions:
1 - "alpha"
2 - "beta"
3 - "gamma"
4 - "delta"
*/
Console
"Go Home!"
,
index.html
-3:27