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、輸出二叉樹左視角能看到的節點

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容