function makeDoggy has an input parameter e. But when calling it through the eventproperty "onClick" there is no parameter passed. Is the img king of "inherited" or something?
import React from 'react';
import ReactDOM from 'react-dom';
function makeDoggy(e) {
// Call this extremely useful function on an <img>.
// The <img> will become a picture of a doggy.
e.target.setAttribute('src', 'https://s3.amazonaws.com/codecademy-content/courses/React/react_photo-puppy.jpeg');
e.target.setAttribute('alt', 'doggy');
}
const kitty = (
<img
onClick={makeDoggy}
src="https://s3.amazonaws.com/codecademy-content/courses/React/react_photo-kitty.jpg"
alt="kitty"/>
);
ReactDOM.render(kitty, document.getElementById('app'));