FreeCodeCampChina / FreeCodeCampChina/freecodecamp.cn

Accessing Objects Properties with Variables

Open
#308 1 comment 0 reactions 0 assignees View on GitHub
Confirmed Need Server Update PR Ready
Dominant language
CSS
Stars
37.8k
Forks
1.4k
PR merge metrics
No merged PRs in 30d

Description

Challenge [Accessing Objects Properties with Variables](https://freecodecamp.cn/challenges/accessing-objects-properties-with-variables) has an issue.
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3133.0 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.

[Accessing Objects Properties with Variables](https://freecodecamp.cn/challenges/accessing-objects-properties-with-variables)
```javascript
var myDog = "Hunter";
var dogs = {
Fido: "Mutt",
Hunter: "Doberman",
Snoopie: "Beagle"
}
var breed = dogs[myDog]; // "Hunter"
console.log(breed)// "Doberman"

```

var breed = dogs[myDog]; // "Hunter"
应该修改为
var breed = dogs[myDog]; // "Doberman"

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.