问答详情
源自:7-20 颠倒数组元素顺序reverse()

如何去点标点符号?直接显示我爱你

<!DOCTYPE html>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Array对象 </title>

<script type="text/javascript">

   var myarr1= ["我","爱","你"];

   document.write(myarr1+"<br/>");

   document.write(myarr1.reverse());

</script>

</head>

<body>

</body>

</html>


提问者:嘿大宝 2018-08-14 08:53

个回答

  • mukewzh
    2018-08-14 09:29:09
    已采纳

    myarr1.join("");   双引号之间不要加东西就行

  • 夏析
    2018-08-31 16:44:25

    (myarr1.reverse().join(""));

  • 小吕123
    2018-08-27 14:00:01

    <!DOCTYPE html>

    <html>

    <head>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <title>Array对象 </title>

    <script type="text/javascript">

       var myarr1= ["我","爱","你"];

       document.write(myarr1+'<br/>');

        document.write(myarr1.join("")+'<br/>');

       document.write(myarr1.reverse().join(""));

    </script>

    </head>

    <body>

    </body>

    </html>