09 2019 档案

摘要:``` // html hello world //输出一个数组 const result = [{tag:'div',num: 100}, {tag: 'div',num: 80}]; ``` ``` Document ``` 阅读全文
posted @ 2019-09-29 16:32 樱风凛 阅读(608) 评论(0) 推荐(0)
摘要:``` // 数组扁平和去重 var arr = [[1,2,2],[3,4,5,5],[6,7,7,9,[11,12,[12,13,[14]]]],10]; function hello (arr) { let res = [] for (let i = 0; i 阅读全文
posted @ 2019-09-16 13:32 樱风凛 阅读(156) 评论(0) 推荐(0)
摘要:https://leetcode cn.com/problems/3sum 阅读全文
posted @ 2019-09-08 19:46 樱风凛 阅读(106) 评论(0) 推荐(0)
摘要:https://leetcode cn.com/problems/two sum/ 暴力,复杂度n的平方 var twoSum = function(nums, target) { let arr = [] for (let i = 0; i 阅读全文
posted @ 2019-09-08 19:02 樱风凛 阅读(133) 评论(0) 推荐(0)
摘要:``` function Event() { this._events = {}; } Event.prototype.on = function(type, fn) { if (!this._events[type]) { this._events[type] = [] } this._events[type].push(fn); } Event.prototype.off = function 阅读全文
posted @ 2019-09-03 00:58 樱风凛 阅读(762) 评论(0) 推荐(0)
摘要:左侧固定右侧自适应 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta 阅读全文
posted @ 2019-09-02 19:41 樱风凛 阅读(1633) 评论(0) 推荐(0)