Coder Social home page Coder Social logo

interviewmap / cs-interview-knowledge-map Goto Github PK

View Code? Open in Web Editor NEW
18.3K 695.0 2.6K 10.64 MB

Build the best interview map. The current content includes JS, network, browser related, performance optimization, security, framework, Git, data structure, algorithm, etc.

Home Page: https://yuchengkai.cn/docs/frontend/

javascript blog interview react vue algorithms

cs-interview-knowledge-map's Introduction

Interview Map

这是一份能让你更好准备下一次面试的图谱

English Version

阅读

微信扫码关注公众号,订阅更多精彩内容 加笔者微信进群与大厂大佬讨论技术

线上版本阅读更清晰

小册

很荣幸在「掘金」平台发售了这个开源项目的进阶版面试小册「前端面试之道」。

如果需要用一句话来介绍这本小册的话,「一年磨一剑」应该是最好的答案了。

为什么这样说呢?在出小册之前,我花了半年的时间做了一个这个开源项目。在半年的时间里,我收集了大量的一线大厂面试题,通过大数据统计出了近百个常考知识点,然后根据这些知识点写成了近十万字的内容。

这本小册是基于本开源项目重新写的一份前端面试书籍(目前已经写作三个月,预计成品需要五个月),对原本的内容进行了大幅度的优化,并且新增了很多新的内容。这本小册可以说是一线互联网大厂的面试精华总结,同时还包含了如何写简历和面试技巧的内容,能够帮助你省时省力地准备面试,让找工作不再是一个难题。

当然小册面向的群体不单单是求职者,同时也适合初级进阶,中级查漏补缺。如果你是一名面试官的话,说不定这本小册也能给你带来一些灵感。

面试是每个程序员都绕不开的坎,虽然这本小册不能帮你一夜之间技术一蹴而就,但是如果你能细细阅读的话,绝对能让你醍醐灌顶。

如果你对于内容不放心的话,可以看一下这两位业内大佬的评价,他们都是仔细读过小册后才给出的一个推荐。

贡献

如果你发现知识点内容有出错或者代码有 Bug,欢迎你提交英文 issue,如果你英文不好的话,请在 该 issue 中讨论

如果你认为有一个不错的知识点或者也想参与翻译校对,欢迎提交 PR,或者也可以联系我 [email protected]

协议

MIT. Copyright (c)

cs-interview-knowledge-map's People

Contributors

a1ooha avatar amandakelake avatar arispen avatar billhanyu avatar bodyno avatar cheerylong avatar dheysonalves avatar fridaydai avatar guzhongren avatar honpery avatar imgss avatar jjchu avatar johnbacy avatar kiesun avatar lksilva avatar mdsb100 avatar misacorn avatar mitch354 avatar mrzhang123 avatar skimklin avatar timetravelcyn avatar vanesusu avatar vivek28111992 avatar william-miao avatar xixilive avatar xyzdbb avatar yaodingyd avatar yygmind avatar zoopers avatar zoux avatar

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  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

cs-interview-knowledge-map's Issues

算法

  • 位运算
    • 前,中,后序遍历
    • Leetcode 104, 111
    • 前驱,后继
    • 平衡二叉树
    • 层级遍历
    • 搜索二叉树
    • 判断完全二叉树,求完全二叉树节点个数(少于 O(N))

JS模拟实现bind,代码示例,args.concat(arguments)有点欠妥

Function.prototype.myBind = function (context) {
  if (typeof this !== 'function') {
    throw new TypeError('Error')
  }
  var _this = this
  var args = [...arguments].slice(1)
  // 返回一个函数
  return function F() {
    // 因为返回了一个函数,我们可以 new F(),所以需要判断
    if (this instanceof F) {
      return new _this(args, ...arguments)
    }
    return _this.apply(context, args.concat(arguments))
  }
}

args.concat(arguments)有点欠妥,arguments在concat时默认不会自动展开

代码运行环境:Chrome 56.0.2924.87
测试代码如下:

Function.prototype.myBind = function (context) {
  if (typeof this !== 'function') {
    throw new TypeError('Error')
  }
  var _this = this
  var args = [...arguments].slice(1)
  // 返回一个函数
  return function F() {
    // 因为返回了一个函数,我们可以 new F(),所以需要判断
    if (this instanceof F) {
      return new _this(args, ...arguments)
    }
    return _this.apply(context, args.concat(arguments))
  }
}

function test(name) {
   this.name = name;
   console.log(this)
}

var testObj = {};

var testBindFn = test.myBind(testObj);

testBindFn("test1");
testBindFn("test2");

运行结果:所处网络无法上传结果截图,请见谅

TCP Based on HTTP

HTTP is stateless, so TCP which is based on HTTP is also stateless. It seems like that TCP links the two ends, client, and server, but it is actually that both the two ends maintain the state together.

This statement is misleading. Yes, both HTTP and TCP are stateless, but TCP is not based on HTTP. In fact, HTTP uses TCP with HTTP being a layer 7 (application) protocol and TCP is a layer 4 (transport) layer protocol.

Missing some core concepts

These following concepts are missing on your InterviewMap under JS section.

  • Cascade
  • Currying
  • Memoization

校对

  • JS
    • 中文
    • 英文
  • 浏览器
    • 中文
    • 英文
  • 安全
    • 中文
    • 英文
  • 性能
    • 中文
    • 英文

Search

I am trying to contact a woman in Shenzhen, China by the name of Xiaoyan. She is 35 years old. I have had communications with er on a restricted site, and would like to continue communications with her on a less restricted site.

HTML

  • SEO
  • form
  • svg
  • cavas

new,自己实现一个 new

控制台报错,不得其解
Uncaught TypeError: Con.apply is not a function
at new create (:9:22)
at :1:9

Chinese Dicuss

For Chinese developers to discuss.
提供给中文开发者讨论问题

V2 Todo

  • Complete the content about CSS
  • Complete the content about Webpack
  • Complete the content about the mini program (WeiXin)
  • Improve the content of the framework

Type Convertion

Objects to Primitive Types
When objects are converted, valueOf and toString will be called, respectively in order. These two methods can also be overridden.

Objects to Primitive Types is not what as your said.
toPrimitive needs a hint argument.

let a = {
  valueOf() {
    return 0;
  },
  toString() {
    return 1;
  }
}

console.log('1' + a); // "10"
console.log(`1${a}`); // "11"

Another case:

let a = {
  valueOf() {
    return 0;
  },
  toString() {
    return 1;
  },
  [Symbol.toPrimitive]() {
    return 2;
  }
}

console.log('1' + a); // "12"
console.log(`1${a}`); // "12"

Git

  • rebase
  • reset
  • stash
  • reflog

对浅拷贝的定义似乎有点问题?

浅拷贝是指a和b指向了同一块内存,所以修改其中任意的值,另一个值都会随之变化。

Object.assign(...)算是不完全的深拷贝,但不能说是浅拷贝吧?

Support us

If this repo helps you, you can support us!
如果这个仓库帮助到了你,你可以 支持我们的工作!

We accept donations through these channels:
我们通过以下方式接受捐赠:

Paypal

性能

  • 监控
  • 完成目前文章中的 Todo

No Content

In the algorithm section, the english version of information is not available, but chinese is. So can you guyz please check that out :)

Bug fix in framework.md

here is a bug in framework.md. due to vue-press will auto compress vue interpolation, thus {{name}} has been convert to . I have made a pr. pls take a look. thanks.
qq20180717-110527

事件触发三阶段,描述似乎有误

window.addEventListener('click',(event) =>{
console.log('冒泡')
},false);
window.addEventListener('click',(event) =>{
console.log('捕获 ')
},true)

chrome 版本 :67.03396.62

执行结果:
addeventlistener

网络

  • TCP
  • UDP
  • HTTP
  • HTTPS
  • HTTP / 2
  • DNS

PDF for offline use

Hey, thanks for this. The content looks amazing.

I was wondering if you've thought about converting the markdowns to PDF (using something like pandoc.)

PDFs allow offline usage & annotations etc.

flattenDeep实现问题

原文
如果想将一个多维数组彻底的降维,可以这样实现

const flattenDeep = (arr) => Array.isArray(arr)
  ? arr.reduce( (a, b) => [...flattenDeep(a), ...flattenDeep(b)] , [])
  : [arr]

flattenDeep([1, [[2], [3, [4]], 5]])

这里多调用了一次flattenDeep吧?
写成这样就可以了:

const flattenDeep = (arr) => Array.isArray(arr)
  ? arr.reduce( (a, b) => [...a, ...flattenDeep(b)] , [])
  : [arr]

获取实例原型为什么不用Object.getPrototypeOf呢

我发现文章好多地方都提到__proto__属性,但这是非官方的属性吧,是各大浏览器自主实现的方便开发人员调试的属性,获取一个实例的原型用Object.getPrototypeOf不应该更好吗

js-cn.md

let a={ name:'FE'}
let b=a
b.name='EF'
console. log(a) // EF
作者原意
console.log( a.name)
这题考的是引用类型和基本类型的内存引用

按位异或

把这句
8 ^ 7 // -> 15
8 ^ 8 // -> 0
// 1000 & 0111 -> 1111 -> 15
// 1000 & 1000 -> 0000 -> 0
改成
8 ^ 7 // -> 15
8 ^ 8 // -> 0
// 1000 ^0111 -> 1111 -> 15
// 1000 ^ 1000 -> 0000 -> 0

JS simulate bind seem not right

Link

https://yuchengkai.cn/docs/zh/frontend/#%E6%A8%A1%E6%8B%9F%E5%AE%9E%E7%8E%B0-call-%E5%92%8C-apply

Describe

In this section , simulate bind:

Function.prototype.myBind = function (context) {
  if (typeof this !== 'function') {
    throw new TypeError('Error')
  }
  var _this = this
  var args = [...arguments].slice(1)
  // return a function
  return function F() {
    // we can use `new F()` because it returns a function, so we need to determine
    if (this instanceof F) {
      return new _this(args, ...arguments)
    }
    return _this.apply(context, args.concat(arguments))
  }
}

Test code:

function Point(x, y, a, b, c) {
  this.x = x;
  this.y = y;
}

var p = new Point(1, 2);
var YAxisPoint = Point.myBind(null, 1);
var axisPoint = new YAxisPoint(5);
console.log(axisPoint);

result:

{
  x: [1],
  y: 5
}

expect:

{
  x: 1,
  y: 5
}

Analysis

In return new _this(args, ...arguments) may not right , because var args = [...arguments].slice(1) is an Array and it will not spread automatic. It need to spread, so code may change like this:

return new _this(...args, ...arguments)

pull request

#66

JS

  • async await 和其他异步 API 的异同
  • Proxy 用途

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.