随笔分类 -  前端

摘要:1,闭包的定义: In computer science, a closure is a function together with a referencing environment for the nonlocal names (free variables) of that function 阅读全文
posted @ 2017-11-23 13:20 laiso 阅读(220) 评论(0) 推荐(0)
摘要:1,对字符串的操作:查找字符串中的所有数字字符串 function findnumber(str) { var arr =[]; var tmp=''; for(var i = 0; i < str.length; i++) if(str.charAt(i)<="9" && str.charAt(i 阅读全文
posted @ 2017-11-21 21:45 laiso 阅读(495) 评论(0) 推荐(0)
摘要://binary tree//add order remove findfunction tree() { var node = function(key) { this.left = null; this.right = null; this.key = key; }; var root = nu 阅读全文
posted @ 2017-11-21 14:21 laiso 阅读(1308) 评论(0) 推荐(0)