1腥寇、https密鑰交互的過程
2、ES6模塊和CommonJs的區(qū)別
3、['1','2','3'].map(parseInt)的結(jié)果
4蛉迹、談一談你了解的web攻擊方式姑隅,以及如何防范
5得滤、實現(xiàn)一個布局盐肃,無論外層容器寬度如何變化,黃色區(qū)域始終相對于外層容器垂直居中号枕,左右各相距20px,同時黃色區(qū)域的高度始終為自身寬度的50%
6缰揪、模擬bind函數(shù)實現(xiàn),如何用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钝腺、有一張白底黑點(diǎn)的圖片如下所示,如何計算出共有多少黑點(diǎn)
8赞厕、輸出二叉樹左視角能看到的節(jié)點(diǎn)