**Tell us what’s happening:**

I know this code isn’t very efficient, but I just can’t figure out why isn’t it working.

**Your code so far**

```
function largestOfFour(arr) {
// You can do this!
var big1=0,big2=0,big3=0,big4=0;
for (var i = 0; i<arr.length; i++) {
switch(i) {
case 0:
for (var j =0; j<arr[i].length;j++) {
if(j=0) {
if(arr[i][j] > big1) {
big1 = arr[i][j];
}
}
else if (arr[i][j]> arr[i][j-1]) {
if(arr[i][j]> big1) {
big1 = arr[i][j];
}
}
}
break;
case 1:
for (var j =0; j<arr[i].length;j++) {
if(j=0) {
if(arr[i][j] > big2) {
big2 = arr[i][j];
}
}
else if (arr[i][j]> arr[i][j-1]) {
if(arr[i][j]> big2) {
big2 = arr[i][j];
}
}
}
break;
case 2:
for (var j =0; j<arr[i].length;j++) {
if(j=0) {
if(arr[i][j] > big3) {
big3 = arr[i][j];
}
}
else if (arr[i][j]> arr[i][j-1]) {
if(arr[i][j]> big3) {
big3 = arr[i][j];
}
}else {
big3 += 0
}
}
break;
case 3:
for (var j =0; j<arr[i].length;j++) {
if(j=0) {
if(arr[i][j] > big4) {
big4 = arr[i][j];
}
}
else if (arr[i][j]> arr[i][j-1]) {
if(arr[i][j]> big4) {
big4 = arr[i][j];
}
}
}
break;
}
}
console.log(big3);
var biggest=0;
let bigArr=[big1, big2, big3, big4];
console.log(bigArr);
for (var g =0; g<bigArr.length;g++) {
if(g=0) {
if(bigArr[g]> biggest) {
biggest = bigArr[g];
}
}
else if (bigArr[g]> bigArr[g-1]) {
if(bigArr[g]> biggest) {
biggest = bigArr[g];
}
}
}
console.log(biggest);
return arr[biggest.split("")[3]];
}
console.log(largestOfFour([[13, 27, 18, 26], [4, 5, 1, 3], [32, 35, 37, 39], [1000, 1001, 857, 1]]));
```

**Your browser information:**

User Agent is: `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36`

.

**Link to the challenge:**

https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-algorithm-scripting/return-largest-numbers-in-arrays