W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
运行代码
<!DOCTYPE html> <html> <body> <h1>JavaScript 数组</h1> <p>concat() 方法连接两个或多个数组。</p> <p id="demo"></p> <script> var sedan = ["S60", "S90"]; var SUV = ["XC40", "XC60", "XC90"]; var Volvo = sedan.concat(SUV); document.getElementById("demo").innerHTML = Volvo; </script> </body> </html>