— 代码区
```
<!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>Document</title>
</head>
<body>
<script>
/* let x=10;let y=x;
console.log(x,y);
console.log("x= %d,y=%d" ,x,y);
x=20;
console.log("x=%d,y=%d",x,y);
//2.引用传递
let obj1={
x:10,
y:20,
};
console.log("obj1= %o" ,obj1);
console.table(obj1);
let obj2=obj1;
console.table(obj2);
obj1.x=”javascript”;
console.table(obj1);
console.table(obj2);const f1=x =>(x=10);
console.log(f1(5));let username="admin";
let str = `HEllo
${username}`;
console.log(str);
let nav=[“首页”,”教学视频”,”文章”];
let html=`
<nav><a href=""><${nav[0]}></a>
<a href=""><${nav[1]}></a>
<a href=""><${nav[2]}></a>
</nav>
`
console.log(html);
document.body.insertAdjacentHTML(‘beforeend’,html);
let [a,b,c="100"]=[10,29];
console.log(a,b,c);
[a,b,c,...d]=[10,20,30,40,50,60];
console.log(a,b,c,d);
console.log(...d);
let a=10,
b=20,
console.log('a=%d,b=%d'); */
let z=10,
q=20;
console.log(z,q);
[z,q]=[q,z];
console.log(z,q);
//数组传惨
let sum =([a,b]) => a+b;
console.log(sum([10,20]));
/* let sum=([a,b])=> a + b;
console.log(sum(10,20)); */
let lecture={
name:'朱老师',
email:'4986464@qq.com',
getInfo:function(){
return `${this.name}:(${this.email}) `;
}
}
console.log(lecture);
let {name,email} =lecture;
console.log(name,email);
user ={
name,email,
getInfo:()=>'${this.name}:{${this.email}}',
}
console.log(user);
</script>
</body>
</html>
```