scrimba
Learn Basic JavaScript
Using Objects for Lookups
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

Using Objects for Lookups
AboutCommentsNotes
Using Objects for Lookups
Expand for more info
index.js
run
preview
console
// Setup
function phoneticLookup(val) {
var result = "";

// Only change code below this line
switch(val) {
case "alpha":
result = "Adams";
break;
case "bravo":
result = "Boston";
break;
case "charlie":
result = "Chicago";
break;
case "delta":
result = "Denver";
break;
case "echo":
result = "Easy";
break;
case "foxtrot":
result = "Frank";
}

// Only change code above this line
return result;
}

// Change this value to test
phoneticLookup("charlie");
Console
index.html
-1:46