Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <body> <h1>JavaScript Functions</h1> <h2>The Arrow Function</h2> <p>This example shows an Arrow Function with a parameter.</p> <p id="demo"></p> <script> let hello = ""; hello = (val) => "Hello " + val; document.getElementById("demo").innerHTML = hello("Universe!"); </script> </body> </html>