1433223_
2018-11-04 14:34
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Array对象 </title>
<script type="text/javascript">
var myarr1= ["我","爱","你"];
var t = myarr1.join("");
// document.write(t.reverse());
var b = t.concat("哟");
document.write(b);
document.write(b.reverse());
</script>
</head>
<body>
</body>
</html>
变量t是一个字符串,concat是连接数组,不是字符串。
var myarr1= ["我","爱","你"];
var t=myarr1.join("");
document.write(t+"<br>");
document.write(myarr1.concat(["哟"])+"<br>");
document.write(myarr1.reverse());
JavaScript进阶篇
468061 学习 · 21891 问题
相似问题