运行 ❯
获取您的
自有
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <body> <h1>JavaScript Operators</h1> <h2>The ... Operator</h2> <p>The "Spread" operator can be used to expand an iterable into more arguments for function calls:</p> <p id="demo"></p> <script> const numbers = [23,55,21,87,56]; let maxValue = Math.max(...numbers); document.getElementById("demo").innerHTML = maxValue; </script> </body> </html>