A few JavaScript practice exercises