Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

Web technologies Questions | React.js Quiz | Set-3 | Question 1

  • Last Updated : 27 Sep, 2021

What is the output of the below code snippets ?

import React from 'react';
import ReactDOM from 'react-dom';
const Component=()=>
{
        return <h1>This is Quiz Portal</h1>
}
 
ReactDOM.render(
    <Component />,
    document.getElementById("root")
);

(A) Component
(B) This is Quiz Portal
(C) Error in code
(D) None of the above


Answer: (B)

Explanation: When the ReactDom will Reader and the component will call then it returns the ,This is Quiz Portal.

Quiz of this Question
Please comment below if you find anything wrong in the above post

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!