FWQ
为什么这段 JavaScript 代码中的 `i` 始终输出 6?
js 闭包问题 给定以下代码: <!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> <style> ul li:nth-child(1) { background: #00ffff; } ul li:nth-child(2) {…