2019-02-25

1、https密钥交互的过程

2、ES6模块和CommonJs的区别

3、['1','2','3'].map(parseInt)的结果

4、谈一谈你了解的web攻击方式,以及如何防范

5、实现一个布局,无论外层容器宽度如何变化,黄色区域始终相对于外层容器垂直居中,左右各相距20px,同时黄色区域的高度始终为自身宽度的50%

6、模拟bind函数实现,如何用call的方式模拟bind方法,参考代码如下

 if(!Function.prototype.bind) {

  Function.prototype.bind = function(oThis) {

    if(typeofthis!== "function") {

      // closest thing possible to the ECMAScript 5 internal IsCallable function

      thrownewTypeError("Function.prototype.bind - what is trying to be bound is not callable");

    }


    varaArgs = Array.prototype.slice.call(arguments, 1), 

        fToBind = this, 

        fNOP = function() {},

        fBound = function() {

          returnfToBind.apply(thisinstanceoffNOP && oThis

                                 ? this

                                 : oThis || window,

                               aArgs.concat(Array.prototype.slice.call(arguments)));

        };


    fNOP.prototype = this.prototype;

    fBound.prototype = newfNOP();


    returnfBound;

  };

}

7、有一张白底黑点的图片如下所示,如何计算出共有多少黑点

8、输出二叉树左视角能看到的节点

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容