Basic javascript typewriter