FreeCodeCampChina / FreeCodeCampChina/freecodecamp.cn
哪里错了
- Dominant language
- CSS
- Stars
- 37.8k
- Forks
- 1.4k
- PR merge metrics
- No merged PRs in 30d
Description
Challenge [Return Largest Numbers in Arrays](https://www.freecodecamp.cn/challenges/return-largest-numbers-in-arrays#?solution=function%20largestOfFour(arr)%20%7B%0A%20%20%2F%2F%20%E8%AF%B7%E6%8A%8A%E4%BD%A0%E7%9A%84%E4%BB%A3%E7%A0%81%E5%86%99%E5%9C%A8%E8%BF%99%E9%87%8C%0A%20%20var%20array%3D%5B%5D%3B%0A%20%20%2F%2F%E9%81%8D%E5%8E%86%E6%95%B0%E7%BB%84%0A%20%20var%20max%3D0%3B%0A%20%20for(var%20i%3D0%3Bi%3Carr.length%3Bi%2B%2B)%7B%0A%20%20%20%20for(var%20j%3D0%3Bj%3Carr%5Bi%5D.length%3Bj%2B%2B)%7B%0A%20%20%20%20%20%20if(max%3Carr%5Bi%5D%5Bj%5D)%7B%0A%20%20%20%20%20%20%20%20max%3Darr%5Bi%5D%5Bj%5D%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%20%20array.push(max)%3B%0A%20%20%20%20%0A%20%20%7D%0A%20%20return%20array%3B%0A%7D%0A%0AlargestOfFour(%5B%20%5B13%2C%2027%2C%2018%2C%2026%5D%2C%5B4%2C%205%2C%201%2C%203%5D%2C%5B32%2C%2035%2C%2037%2C%2039%5D%2C%20%5B1000%2C%201001%2C%20857%2C%201%5D%5D)%3B%0A) has an issue.
User Agent is: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.
My code:
```javascript
function largestOfFour(arr) {
// 请把你的代码写在这里
var array=[];
//遍历数组
var max=0;
for(var i=0;i
Contributor guide
Research direction
Start with the supplied largestOfFour call and compare its result with the linked Return Largest Numbers in Arrays challenge requirements. Trace the values across each inner array, then verify that the function returns one largest value per inner array for the provided example and other valid inputs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- content
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100