in ReactJS by
retagged by
What would be the output of the following example?

var Helloword=(props)=>  

{  

 return(  

 <div>  

 Hello World 1  

 </div>  

 <div>  

 Hello World 2  

 </div>  

 );  

}  

ReactDOM.render(<Helloworld/>,mountNode)  

a) Hello World 1

b) Hello World 2

c) Hello World 1 Hello World 2

d) Error

1 Answer

0 votes
by

D is the correct option. The two adjacent elements in JSX should be wrapped in an element so, this program will result an error.

...