运行 ❯
获取您
自身
网站
×
更改方向
保存代码
更改主题,深色/浅色
转到 Spaces
<!DOCTYPE html> <html> <body> <h1>JavaScript Functions</h1> <h2>The Arrow Function</h2> <p>This example shows the syntax of an Arrow Function, and how to use it.</p> <p id="demo"></p> <script> let hello = ""; hello = () => { return "Hello World!"; } document.getElementById("demo").innerHTML = hello(); </script> </body> </html>