In the code editor, you can see a JSX expression that displays the first twenty digits of pi.
Study the expression and notice the following:
<div>on line 5. From there up through
</div>, the code will be treated as JSX.
Math. From there up through
Declare a new variable named
math equal to a JSX
Put the following text inside of the
2 + 3 = 2 + 3
At the bottom of the file, call
ReactDOM.render()‘s first argument, pass in
ReactDOM.render()‘s second argument, pass in
As you probably expected, the equation was displayed as a string.
Insert a pair of curly braces into the
<h1></h1>, so that the browser displays
2 + 3 = 5.