update
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
const trainer = {
|
||||
name: "现代 JS 训练营",
|
||||
report() {
|
||||
setTimeout(() => {
|
||||
const a = this.name
|
||||
const output = document.getElementById("output")
|
||||
output.textContent = a
|
||||
}, 1000)
|
||||
// 任务:
|
||||
// 1. 用 setTimeout
|
||||
// 2. 在回调里用箭头函数读取 this.name
|
||||
|
||||
Reference in New Issue
Block a user