<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<script>
const names = ['zhang','li','deng','mongodb'];
// for(let name of names.entries()){//.entries()得到数组中的索引值和值 不适用与对象
// console.log(name);
// }
// function sum() {
// let total = 0;
// for(let num of arguments){
// total = total + num;
// }
// console.log(total)
// return total;
// }
// sum(10,20,10,10,120);
let name = 'ugfuishdihs';
for(let nam of name){
console.log(nam)
}
// for...of.. 也可以用于 NODElist
</script>
</body>
</html>