You are on page 1of 1

Enrol. No.

: 202003103510173

Practical 1
Aim: Create a “Hello World” program using ES6 arrow function in react.

Code:

<!DOCTYPE html>
<html>
<head>
<tittle>
<h1> Practical 1 </h1>
</tittle>

<body>
<p id="function1"></p>
<p id="function2"></p>

<script>
world = function()
{
return "Hello";
}
document.getElementById("function1").innerHTML =
world(); hello = () =>
{
return "World";
}
document.getElementById("function2").innerHTML =
hello(); </script>

</body>
</head>
</html>

Output:

CGPIT/CE/SEM-6/A/IT-5024 Full Stack Development 1

You might also like