<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title></title>
</head>
<body>
<div id="app">
</div>
<script>
let message = 'x𠮷u'
//无法访问“𠮷”
for (let i = 0; i < message.length; i++) {
console.log(message[i])
}
//无法访问“𠮷”
for (let i in message) {
console.log(message[i])
}
//可以访问“𠮷”
for(let item of message) {
console.log(item)
}
//可以访问“𠮷”
let arr1 = [...message]
arr1.forEach(item => {
console.log(item)
})
//可以访问“𠮷”
let arr2 = [...message]
for (let i = 0; i < arr2.length; i++) {
console.log(arr2[i])
}
</script>
</body>
</html>
![](https://img-blog.csdnimg.cn/20210423164629730.png)