Napier Healthcare interview question

JavaScrip Oops