This is exercise, the <div>
tag doesn’t have an id named ‘challenge-node’ but when rendered in the ReactDOM.render() it works when an id of ‘challenge-node’ is added at the second argument, can someone explain please
const JSX = (
<div>
<h1>Hello World</h1>
<p>Lets render this to the DOM</p>
</div>
);
ReactDOM.render(JSX, getElementById('challenge-node'))
const JSX = (
<div>
<h1>Hello World</h1>
<p>Lets render this to the DOM</p>
</div>
);
// Change code below this line
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36
.
Challenge: Render HTML Elements to the DOM
Link to the challenge: