-
本期的主题是**调用堆栈**,本计划一共28期,**每期重点攻克一个面试重难点**,如果你还不了解本进阶计划,文末点击查看全部文章。
如果觉得本系列不错,欢迎点赞、评论、转发,您的支持就是我坚持的最大动力。
---
JS内存空间分为**栈(stack)**、**堆(heap)**、**池(一般也会归类为栈中)**。 其中**栈**存放变量,**堆**存放复杂对…
-
## 引言
上篇文章介绍了构造函数、原型和原型链的关系,并且说明了 `prototype` 、`[[Prototype]]` 和 `__proto__` 之间的区别,今天这篇文章用图解的方式向大家介绍原型链及其继承方案,在介绍原型链继承的过程中讲解原型链运作机制以及属性遮蔽等知识。
建议阅读上篇文章后再来阅读本文,链接:[【进阶5\-1期】重新认识构造函数、原型和原型链](ht…
-
Support virtual scrolling over a list of items whose size is not known and needs to be measured
-
## 前言
> 大家好,我是[simbawu](https://github.com/simbawus),关于这篇文章,有问题欢迎来[这里](https://github.com/simbawus/blog/issues/16)讨论。
随着移动互联网的普及和快速发展,手机成了互联网行业最大的流量分发入口。以及随着5G的快速发展,未来越来越多的“端”也会如雨后春笋般快速兴起。而“快”作为…
-
React converts boolean data-attributes to `"true"`, while leaving boolean attributes as `""` (empty string). This is inconsistent with the way Javascript works and _also_ it's inconsistent from the wa…
-
# 深入浅出 - vue变化侦测原理
其实在一年前我已经写过一篇关于 [vue响应式原理的文章](https://github.com/berwin/Blog/issues/11),但是最近我翻开看看发现讲的内容和我现在心里想的有些不太一样,所以我打算重新写一篇更通俗易懂的文章。
我的目标是能让读者读完我写的文章能学到知识,有一部分文章标题都以深入浅出开头,目的是把一个复杂的东西排除…
-
## 引言
上篇文章详细介绍了浅拷贝 `Object.assign`,并对其进行了模拟实现,在实现的过程中,介绍了很多基础知识。今天这篇文章我们来看看一道必会面试题,即如何实现一个深拷贝。本文会详细介绍对象、数组、循环引用、引用丢失、Symbol 和递归爆栈等情况下的深拷贝实践,欢迎阅读。
## 第一步:简单实现
其实深拷贝可以拆分成 2 步,浅拷贝 + 递归…
-
## 引言
上篇文章介绍了赋值、浅拷贝和深拷贝,其中介绍了很多赋值和浅拷贝的相关知识以及两者区别,限于篇幅只介绍了一种常用深拷贝方案。
本篇文章会先介绍浅拷贝 `Object.assign` 的实现原理,然后带你手动实现一个浅拷贝,并在文末留下一道面试题,期待你的评论。
## 浅拷贝 `Object.assign`
上篇文章介绍了其定义和使用,主要是将所有…
-
之前文章详细介绍了 this 的使用,不了解的查看【进阶3-1期】。
## call() 和 apply()
> call() 方法调用一个函数, 其具有一个指定的 `this` 值和分别地提供的参数(**参数的列表**)。
`call()` 和 `apply()`的区别在于,`call()`方法接受的是**若干个参数的列表**,而`apply()`方法接受的是**一…
-
# 后Angular时代二三事
JavaScript框架/库一直就是百花齐放,最近几年更是层出不穷。回顾这几年,有两个最引人注目的东西,一个是Angular,一个是React。其中,Angular最火的时间是2013年中到2014年末,React从2014年中开始升温,然后又由于ReactNative等周边项目,导致关注度很高。
2014年末,Angular官方宣布了一个大新闻,要完全重写An…
xufei updated
8 months ago