Because FCC tester doesn’t reset global variables between runs. So your largestArray variable will have some value in it before second and third tests.
no it would be a global variable … but declared … but still would not be allowed to pass.
(global is anything outside function)
also look at his for loop … for(i =0 … this is not declared and would have a global …i… created … really really needs to use var (this will not be stopped from passing)