Which of the following is the correct output of the below code. If a component is called Geeks and is rendered to another Dom which element will be rendered ?
function Geeks(){ return <h1> geeks For geeks </h1> ReactDOM.render(,document.getElementById('root')); }
(A) div
(B) section
(C) h1
(D) component
Answer: (C)
Explanation: If a component is called Geeks and is rendered to another DOM h1 element will be rendered.
Quiz of this Question
Please comment below if you find anything wrong in the above post
Article Tags :
Recommended Articles