运行 ❯
获取您
自己
的网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <body> <h2>JavaScript Arrays</h2> <p>The Array.toString() method returns a string with all array values separated by commas:</p> <p id="demo"></p> <script> const fruits = ["Banana", "Orange", "Apple", "Mango"]; let text = fruits.toString(); document.getElementById("demo").innerHTML = text; </script> </body> </html>