This commit is contained in:
rou
2026-03-23 14:56:04 +08:00
parent 00d3c9e4c6
commit 1071f4db05
27 changed files with 549 additions and 50 deletions

View File

@@ -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