Adam Ma

Results 15 comments of Adam Ma

```js var preorderTraversal = function(root) { const stack = [] const res = [] while(root){ // 优化点, 没有右节点无需入栈,节约空间 if(root.right) stack.push(root) res.push(root.val) if(root.left){ root = root.left }else{ let last = stack.pop()...

![image](https://user-images.githubusercontent.com/21209891/74169807-e0327600-4c66-11ea-8c98-4e3deb77a520.png) es6 解构我得执行顺序为什么和老师视频里面的不一样呢? 我使用解构是得不出正确答案的 执行顺序应该是 先执行了一个函数然后赋值给了 left 然后用这个错误的left去执行的下一个函数

> ![image](https://user-images.githubusercontent.com/21209891/74169807-e0327600-4c66-11ea-8c98-4e3deb77a520.png) > es6 解构我得执行顺序为什么和老师视频里面的不一样呢? > 我使用解构是得不出正确答案的 > 执行顺序应该是 先执行了一个函数然后赋值给了 left 然后用这个错误的left去执行的下一个函数 我得代码和大圣老师的一样呀,执行结果不同

> 以下为个人猜想没有确切的理论依据: > > > push() 方法将一个或多个元素添加到数组的末尾,并返回该数组的新长度。 > > 根据MDN的说法理解,`push`方法应该是根据数组的`length`来根据参数给数组创建一个下标为`length`的属性,我们可以做以下测试: > ![image](https://user-images.githubusercontent.com/6418374/55369081-9c8bbd80-5527-11e9-82c6-10eb6f09e32e.png) > > 根据这个测试我们发现,`push`方法影响了数组的`length`属性和对应下标的值。 > 然后,正如楼上所说: > > > 在对象中加入splice属性方法,和length属性后。这个对象变成一个类数组。 > > 我们使用题目中的代码时得到了这个结果: > ![image](https://user-images.githubusercontent.com/6418374/55369152-ebd1ee00-5527-11e9-9898-2c03edbe5d36.png) > > 这个时候控制台输出的是一个数组,但是实际上它是一个伪数组,并没有数组的其他属性和方法,我们可以通过这种方法验证: >...

> MathJax version 2 doesn't handle `\log_a \nolimits`; in version 2, the `\nolimits` must immediately follow the `\log`, as in `\log\nolimits_a`. > > My recommendation would be to move to...

您可真秀,学会这个就让过???字节让我大开眼界

> How many chunks you have? Do you extract runtime? If you have dymanic chunks their names are changed so contenthash is different. Maybe you can provide small example? Thanks...

Btw, what's the rule for calculating the `moduleIds` ? Is there another way to let all of `moduleIds` fixed in the `monaco-editor`. I just know a way is to set...

> > I saved my project in two version while their monaco-editor versions are identity. > > what does it means? The important thing is when > > ```js >...

> @adamma1024 Do you have the special plugin for `monaco-editor` (if I remember right there is bug there, it was reported multiple times). Also maybe you can create small reprocible...