JavaScript React Basics First Steps in React Create a React Element

Hanna Zeif
Hanna Zeif
11,309 Points

Uncaught SyntaxError: missing ) after argument list

All my console is showing is this error. My code is the same as shown in the video, minus some of the attributes inside the object.

const title = React.createElement( 'h1', {id: 'main-title'} 'My first React element!' );

console.log(title);

1 Answer

KRIS NIKOLAISEN
KRIS NIKOLAISEN
54,333 Points

You are missing a comma after {id: 'main-title'}