Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Code I write wrong deliberately can run and work as well. #647

Open
DavidTore opened this issue Oct 31, 2019 · 1 comment
Open

The Code I write wrong deliberately can run and work as well. #647

DavidTore opened this issue Oct 31, 2019 · 1 comment

Comments

@DavidTore
Copy link

Challenge Manipulate Arrays With pop has an issue.
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

// 举例
var ourArray = [1,2,3];
var removedFromOurArray = ourArray.pop(); 
// 经过 pop 操作之后,removedFromOurArray 的值为 3, ourArray 的值为 [1,2]

// 初始化变量
var myArray = [["John", 23], ["cat", 2]];

// 请只修改这条注释以下的代码
var removedFromMyArray = myArray[myArray.length - 1];

When I run the code mentioned above, I surprisedly found that it can work as well ! That is WRONG, because myArray still has a second array. I deliberately remain the second children.

@DavidTore
Copy link
Author

And when I switch to the FCC English Version, my code CANNOT PASS the test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant