Below’s my code. I’ve also tried putting “ballcap” and “jersey” in quotes which works as long as I don’t have testObj. in the variables. When I include testObj in with the strings I’m told that it’s expecting an identifier, without telling me what an identifier is.
Your code so far
// Setup
var testObj = {
"hat": "ballcap",
"shirt": "jersey",
"shoes": "cleats"
};
// Only change code below this line
var hatValue = testObj.ballcap; // Change this line
var shirtValue = testObj.jersey; // Change this line
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/accessing-object-properties-with-dot-notation