运行 ❯
获取您
的
网站
×
更改方向
保存代码
更改主题,暗/亮
前往 Spaces
<!DOCTYPE html> <html> <body> <h2>JavaScript Arrow Functions</h2> <p>With arrow functions, you don't have to type the function keyword, the return keyword, and the curly brackets.</p> <p>Arrow functions are not supported in IE11 or earlier.</p> <p id="demo"></p> <script> const x = (x, y) => x * y; document.getElementById("demo").innerHTML = x(5, 5); </script> </body> </html>