Giter Club home page Giter Club logo

coffe1891 / frontend-hard-mode-interview Goto Github PK

View Code? Open in Web Editor NEW
3.2K 3.2K 313.0 10.88 MB

《前端内参》,有关于JavaScript、编程范式、设计模式、软件开发的艺术等大前端范畴内的知识分享,旨在帮助前端工程师们夯实技术基础以通过一线互联网企业技术面试。

Home Page: https://coffe1891.gitbook.io/frontend-hard-mode-interview/

License: Other

JavaScript 100.00%
design-patterns-js fp frontend-interview interview-preparation javascript javascript-framework jquery oop react react-native rxjs vscode vue

frontend-hard-mode-interview's Introduction

👋 Hi there

I am Bob Ma from Beijing, China.I am a big-front-end engineer.I love coding using with JavaScript/ECMAScript,Java and so on.

As an old programmer, coding has become a part of life, coding to be 80 years old is my ideal, and JavaScript is my beloved language!

Since I published my first Internet technology book in 2010, there is no time to write a systematic discussion of technology. Because I later joined Qihoo 360 and Baidu, two first-tier Internet companies, engaged in front-end and mobile client technical work, and presided over the development of mobile apps for 150 million of users. During this period, it was quite busy.

After accepting the re-forging and reshaping of first-line Internet companies, programming is like playing a game, which makes me feel happy and fulfilled. Every day I can "clear", solve one problem after another, and work together with outstanding, smart, wise and enthusiastic colleagues to create one after another vivid and interesting products, and the sense of accomplishment is full... and most importantly , I can make a lot of money in this process, so that I can live decently as a programmer and do what I like, these are really wonderful!

🌐 Programming Languages

Know/Using

Learning

🛠️ Tools

Know/Using

Learning

frontend-hard-mode-interview's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

frontend-hard-mode-interview's Issues

纠正一下

函数作用域 那里b 应该是未定义,不应该是undefined

深拷贝那里有点问题

深拷贝那里,不能直接将result赋值为空对象,这样会破坏对象的原型链,而且修改了对象。
可以改成这样:

result = new obj.constructor()

利用原对象的构造函数生成新对象,然后用for in 循环给对象添加属性。不过这种方式也存在弊端,如果构造函数需要接收参数做计算,就会导致执行时报错。

注释错误

1.1.3 ES8新特性 >> Object.values() / Object.entries

代码注释不通顺
image

fix: binary tree image error

fix: binary tree image error

image

https://coffe1891.gitbook.io/frontend-hard-mode-interview/2/2.1.4

solution

https://github.com/coffe1891/frontend-hard-mode-interview/blob/master/2/2.1.4.md

- ![](http://img.blog.csdn.net/20150204101904649?%3C/p%3E%3Cp%3Ewatermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvTXlfSm9icw==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)

+ ![image](https://user-images.githubusercontent.com/7291672/152813666-575ead67-af69-46a6-8cba-dc12060cabb5.png)

image

for..of 并不适用遍历 类数组对象

壹2.9.2的总结这里
总结:
for..of适用遍历数组/类数组对象/字符串/map/set等拥有迭代器对象的集合,但是不能遍历对象,因为没有迭代器对象。遍历对象通常用for...in来遍历对象的键名。

1.1.1章rest和spread示例疑问

1.1.1章rest和spread部分的代码示例里面,在声明函数时参数中使用...,被标注为扩展运算符是否是不正确的,因为此处并不是对一个数据进行展开操作,而是表示对象中除了a剩余的数据存入到变量param中,符合rest参数的定义。

function foo({ a, ...param }) {//这里...是扩展运算符
  console.log(a); //>> 1
  console.log(param); //>> {b: 2, c: 3}
}

上面应该还是rest参数,下面在函数调用时使用的...应该才是扩展运算符。

const param = { b: 2, c: 3 };
foo({ a: 1, ...param });  //此处为扩展运算符

2.1.2 函数声明提升 代码示例错误反馈

2.1.2 函数声明提升 中的代码

虽然此章节为重点讲解函数声明的提升,但是因为log了func1,所以此处建议进行修改

//函数的声明形态
function func0() {
return 0;
}
console.log(func0); //>> func0() {return 0}
console.log(func1); //>> undefined
//函数的表达式形态
var func1 = function() {
return 1;
};

应该为

//变量声明提升
var func1
//函数的声明形态
function func0() {
return 0;
}
console.log(func0); //>> func0() {return 0}
console.log(func1); //>> undefined
//函数的表达式形态
func1 = function() {
return 1;
};

开启严格模式

壹.2.1.4 匿名函数真的没办法实现递归调用自身吗?有!

最后一句话:在代码任意行输入字符串"use strict"可以开启严格模式。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.