Return Largest Numbers in Arrays - help

Tell us what’s happening:
I was stuck so I looked at the solution and I changed my var modArr = to modArr = [0,0,0,0] and I wanted to use push(i) to push the largest integer to my modArr instead I did the solution way.

Was my way possible?

Your code so far

function largestOfFour(arr) {
  // You can do this!
  var modArr = [0,0,0,0];
  
  for(var i = 0; i<arr.length; i++){
    for(var j = 0; j<arr[i].length; j++){
      if(arr[i][j] > modArr[i]){
        modArr[i] = arr[i][j];
      }
    }
  }
  
  
  return modArr;
}

largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0.

Link to the challenge:
https://www.freecodecamp.org/challenges/return-largest-numbers-in-arrays

I did not pay attention to the 4 array limiter so I was thinking about an empty array from the beginning hence I had assigned the var modArr = [] and intended to push in values. Would that have been possible is my question.

I did experiment with the following before peeking at the solution

I had assigned var modArr = [] and used the following code inside the if statement

modArr.push(arr[i][j])

it returns an empty array.
Could you give me a hint or a nudge in the right direction?

where can I find info on other cool keywords like the spoiler one you just mentioned?

Thanks for the effort, I have currently moved on to other challenges but will try out what you have suggested and I will let you know the result.