Jeffery

Results 4 issues of Jeffery

>```js >var b = 10; >(function b(){ > b = 20; > console.log(b); >})(); >``` 我的解法: 1)打印10 >```js >var b = 10; >(function b(b) { > window.b = 20; >...

JS基础

>```js >var b = 10; >(function b() { > b = 20; > console.log(b) >})() >``` 针对这题,在知乎上看到别人的回答说: 1. 函数表达式与函数声明不同,函数名只在该函数内部有效,并且此绑定是常量绑定。 2. 对于一个常量进行赋值,在 strict 模式下会报错,非 strict 模式下静默失败。 3. IIFE中的函数是函数表达式,而不是函数声明。 实际上,有点类似于以下代码,但不完全相同,因为使用const不管在什么模式下,都会TypeError类型的错误 >```js >const...

JS基础

>```js >function concatArr (arr1, arr2) { > const arr = [...arr1]; > let currIndex = 0; > for (let i = 0; i < arr2.length; i++) { > const RE...

编程题

### Pre-flight checklist - [X] I have read the [contribution documentation](https://github.com/electron/forge/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [code of conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project uses. - [X]...