summaryrefslogtreecommitdiff
path: root/content/article/js-problem.md
diff options
context:
space:
mode:
Diffstat (limited to 'content/article/js-problem.md')
-rw-r--r--content/article/js-problem.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/content/article/js-problem.md b/content/article/js-problem.md
index aaf71f76..d0f05586 100644
--- a/content/article/js-problem.md
+++ b/content/article/js-problem.md
@@ -121,7 +121,7 @@ false
再来做一道选择题吧,以下哪个 JavaScript 表达式的值是 `false`?
-![](https://r2.eltr.ac/geedeapro/article/js-problem/js-choice.jpeg "A. `typeof null === 'object';` B. `Math.min() > Math.max();` <br/> C. `NaN === NaN;` D. `0 == ''`")
+![](https://img.eltr.ac/geedeapro/article/js-problem/js-choice.jpeg "A. `typeof null === 'object';` B. `Math.min() > Math.max();` <br/> C. `NaN === NaN;` D. `0 == ''`")
答案是 C,`NaN` 不是自等的。*是的,一切都是 `object`,最小数比最大数更搭,以及老生常谈的,`0` 等于空字符串。*
@@ -156,7 +156,7 @@ false
首先,如今人们开发一个最简单的网页都会用 React 或者 Vue.js 等现代的前端框架,还要为这些框架导入样式库(比如 TailwindCSS 和 shadcn),哪怕他们只是想写个甚至不需要 Reactivity、甚至没有复杂交互功能的简单网页。
-!["一个正态分布曲线,最左侧是一个看起来脑袋很小的人,他说“Pure HTML CSS and JS is the best option",曲线顶端是一个戴眼镜的急哭了的人,他说“Noo, we need a framework for JS, library for styling and 146 other dependencies.”,最右侧是一位穿着斗篷的智者,他说“Pure HTML CSS and JS is the best option”](https://r2.eltr.ac/geedeapro/article/js-problem/programmerhumor-io-frontend-memes-javascript-memes-692a23210511647-608x434.jpg "“纯 HTML、CSS 和 JS 最好” “不!我们需要框架和样式库,还有 146 个其他的依赖项。”")
+!["一个正态分布曲线,最左侧是一个看起来脑袋很小的人,他说“Pure HTML CSS and JS is the best option",曲线顶端是一个戴眼镜的急哭了的人,他说“Noo, we need a framework for JS, library for styling and 146 other dependencies.”,最右侧是一位穿着斗篷的智者,他说“Pure HTML CSS and JS is the best option”](https://img.eltr.ac/geedeapro/article/js-problem/programmerhumor-io-frontend-memes-javascript-memes-692a23210511647-608x434.jpg "“纯 HTML、CSS 和 JS 最好” “不!我们需要框架和样式库,还有 146 个其他的依赖项。”")
React 里有个概念叫作虚拟 DOM,这就是对真实 DOM 树的额外抽象,如果 DOM 本身足够复杂,操作虚拟 DOM 就会容易管理不少。只不过,在大部分网页开发中,额外的抽象层都是过度抽象,做一个简单的网页也要用脚手架搭一个完整的项目结构也完全是过度工程。更何况这不会让开发效率有质的提升,反而会*显著*拖慢网页的加载速度。