代码拉取完成,页面将自动刷新
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<script type="text/javascript">
var str="hello world"
console.log(str.indexOf('o'))
console.log(str.lastIndexOf('o'))
console.log(str.indexOf('o',5))
console.log(str.indexOf('html'))
var str1=' \t\vhello world\r\n '
console.log(str1.length)
console.log(str1.trim().length)
var str2="\'hello\' world"
console.log(str2)
var str3='"hello" world'
console.log(str3)
var str4='\'hello\' world'
console.log(str4)
var str5='hello\nworld'
console.log(str5)
// 空额
var str6='hello\
world'
console.log(str6)
var arr1= "hello,world, I, am, coming".split(",")
console.log(arr1)
var arr2="hello".split()
console.log(arr2)
var arr3="hello".split("")
console.log(arr3)
var str7=arr3.join(",")
console.log(str7)
var str7=" hello world "
console.log("end:",str7.trimEnd())
</script>
</head>
<body>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。