두 수 비교해서 큰 수 출력하는 함수 짜서 전역변수 선언한 다음에 document.write문에 해당 전역변수 넣었거든?

근데 얘가 document.write문 앞에서만 작동하고 document.write문에는 출력이 안됨

이거 어떻게 된거냐