creates index page and writes getJoke JS method