Getting somewhere with the cat homework in JavaScript.