Professional Documents
Culture Documents
PR 1fsdpdf
PR 1fsdpdf
Practical : 1
AIM : Create a “Hello World” program using ES6 arrow function in react.
Code :
<html>
<body>
<p> id = “function”</p>
<p> id = “arrow” </p>
<script>
world=function()
{
return(“using function = Hello World”);
}
hello = () =>
{
return(“using arrow = Hello World”);
}
document.getElementById(“function”).innerHTML=world();
document.getElementById(“arrow”).innerHTML=hello();
</script>
<body>
<html>
Output: