From e00f29cbd33e6746db131024af51b977099bd93b Mon Sep 17 00:00:00 2001 From: MonsterPi <43134418+MonsterPi13@users.noreply.github.com> Date: Sun, 31 Mar 2024 18:05:45 +0800 Subject: [PATCH] docs: improve content accuracy (#427) --- .../zh-CN.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/quiz/questions/why-is-it-in-general-a-good-idea-to-leave-the-global-scope-of-a-website-as-is-and-never-touch-it/zh-CN.mdx b/packages/quiz/questions/why-is-it-in-general-a-good-idea-to-leave-the-global-scope-of-a-website-as-is-and-never-touch-it/zh-CN.mdx index 2d2da6412..d75e1e003 100644 --- a/packages/quiz/questions/why-is-it-in-general-a-good-idea-to-leave-the-global-scope-of-a-website-as-is-and-never-touch-it/zh-CN.mdx +++ b/packages/quiz/questions/why-is-it-in-general-a-good-idea-to-leave-the-global-scope-of-a-website-as-is-and-never-touch-it/zh-CN.mdx @@ -1,5 +1,5 @@ --- -title: 为什么一般来说,让一个网站的全局范围保持原样,永远不可触及是个好主意? +title: 为什么通常最好保留网站的全局作用域不做任何修改? --- 在浏览器中执行的 JavaScript 可以访问全局范围,如果每个人都使用全局命名空间来定义他们的变量,很可能会发生碰撞。 使用模块模式(IIFEs) 在本地命名空间中封装你的变量。