Well, as I said first of all it’s calling a .push() method on an “undefined” variable which throws and error and stops further execution.
If it’s recursion you are confused about, I recommend further reading on https://www.geeksforgeeks.org/recursion/. It’s not an easy concept to get your head around for most people (including me).
var array; // create variable of value undefined
array.push(n); // you can't push to undefined
array = countdown(n-1); // overwrite array variable so anything above this (if there weren't errors) is cancelled