Hello, I’d like to ask why I’m failing this challenge when I’m using dot notation, when I change it to bracket notation it passes without any problems.
Code I’m reffering to:
// Setup
function phoneticLookup(val) {
var result = "";
// Only change code below this line
var testVar = {
alpha : 'Adams',
bravo : 'Boston',
charlie : 'Chicago',
delta : 'Denver',
echo : 'Easy',
foxtrot : 'Frank'
}
var result = testVar.val;
// Only change code above this line
return result;
}
// Change this value to test
console.log(phoneticLookup("alpha"));