嘿大宝
2018-08-14 08:53
<!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>
myarr1.join(""); 双引号之间不要加东西就行
(myarr1.reverse().join(""));
<!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>
JavaScript进阶篇
468195 学习 · 21891 问题
相似问题