-
Notifications
You must be signed in to change notification settings - Fork 102
Expand file tree
/
Copy pathApp.js
More file actions
31 lines (25 loc) · 825 Bytes
/
App.js
File metadata and controls
31 lines (25 loc) · 825 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
Build your `first Hello World` program using,
Using `just HTML`
Using `JS to manipulate the DOM`
Using `React`
use `CDN Links`
Create `an Element`
Create `nested React Elements`
Use `root.render`
*/
// Q1): Build your `first Hello World` program using, HTML
/*
<h1>Hello World using HTML</h1>
*/
// Q2): Build your `first Hello World` program using, JavaScript DOM
/*
const heading = document.createElement("h1");
heading.textContent = "Hello World using JavaScript DOM";
const root = document.getElementById("root");
root.appendChild(heading);
*/
// Q3): Build your `first Hello World` program using, React
const heading = React.createElement("h1", null, "Hello World using React");
const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(heading);