js面试题
作者:互联网
1、考查函数表达式知识
var h = function a(){ return 23; } console.log(typeof a()) // 报错 2、封装函数insertAfter( );功能类似insertBefore( ) Element.prototype.insertAfter = function(targetNode, afterNode){ var beforeNode = afterNode.nextElementSibling; if(beforeNode == null){ this.appendChild( targetNode ) }else{ this.insertBefor( targetNode, beforeNode) } }标签:function,面试题,beforeNode,insertAfter,afterNode,js,targetNode,var 来源: https://www.cnblogs.com/cuishuangshuang/p/13031187.html