摘要:
bind里面的原理就是使用apply 或者使用call来改变this指针 Function.prototype.myBind = function (ctx = window) { let self = this; let args = [...arguments].slice(1); return 阅读全文
posted @ 2020-11-09 11:08
王室
阅读(68)
评论(0)
推荐(0)
摘要:
使用字符的一个一个判断处理 const obj = { '{': "}", '(': ")", '[': "]", } function isValid(str) { const len = str.length let index = 0 if (len % 2 !== 0) { return f 阅读全文
posted @ 2020-11-09 11:07
王室
阅读(776)
评论(0)
推荐(0)

浙公网安备 33010602011771号