Intro to React JS part 1 5/18


getting an error here but i cant scroll up on the error log to read the error. very frustrating codeacademy.. any idea what is wrong here?

var React = require('react');
var ReactDOM = require('react-dom');

// Write code here:
var math =

{2 + 3 = 2 + 3}

ReactDOM.render(math, document.getElementById('app'));


This is not a valid JavaScript expression. Consider that the left side of the equals (including the equal sign) should be string data, and the right side becomes an expression.

2 + 3 = {2 + 3}

Now the expression will render AFTER JavaScript evaluates it.

2 + 3 = 5


thank you for your help! that makes a lot of sense. It might be good to change the wording on this problem as it is a bit confusing the way it written now.


We'll have to wait until this course is more mature to see what issues/concerns users raise. I can't share in the confusion, though.


Thanks for posting this. I was confused with the language too.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.