Add my solution to javascript/jquery exercise