上一页 1 2 3 4 5 6 7 ··· 87 下一页
摘要: https://leetcode.com/problems/x-of-a-kind-in-a-deck-of-cards/ In a deck of cards, each card has an integer written on it. Return true if and only if y 阅读全文
posted @ 2019-12-26 19:17 _Zlrrr 阅读(240) 评论(0) 推荐(0)
摘要: https://leetcode.com/problems/find-all-duplicates-in-an-array/ Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twic 阅读全文
posted @ 2019-12-26 19:14 _Zlrrr 阅读(132) 评论(0) 推荐(0)
摘要: https://leetcode.com/problems/jump-game-ii/ Given an array of non-negative integers, you are initially positioned at the first index of the array. Eac 阅读全文
posted @ 2019-12-26 19:11 _Zlrrr 阅读(181) 评论(0) 推荐(0)
摘要: https://leetcode.com/problems/fibonacci-number/ The Fibonacci numbers, commonly denoted F(n) form a sequence, called the Fibonacci sequence, such that 阅读全文
posted @ 2019-12-26 19:09 _Zlrrr 阅读(174) 评论(0) 推荐(0)
摘要: https://leetcode.com/problems/is-subsequence/ Given a string s and a string t, check if s is subsequence of t. You may assume that there is only lower 阅读全文
posted @ 2019-12-26 19:08 _Zlrrr 阅读(177) 评论(0) 推荐(0)
摘要: 一.原型链继承 特点:子类型的原型是父类型的一个实例对象 父类新增原型方法或原型属性子类都会访问到 简单易于实现 子类的实例通过 _proto_ 访问到父亲的实例 这样就可以访问父类的私有方法 然后通过 _proto_ 指向父类的 prototype 获得父亲原型上的方法 这样做到将父类的私有 公有 阅读全文
posted @ 2019-12-25 11:08 _Zlrrr 阅读(143) 评论(0) 推荐(0)
摘要: import React, {useState, useEffect} from 'react'; function Example() { const [count, setCount] = useState(0); useEffect(() => { document.title = `You 阅读全文
posted @ 2019-12-08 23:09 _Zlrrr 阅读(295) 评论(0) 推荐(0)
摘要: yyyy-mm-dd 向前取一个月时间 (传入参数是 yyyy-mm-dd 字符串 返回值同) function getPreMonth(date) { var arr = date.split('-'); var year = arr[0]; var month = arr[1]; var day 阅读全文
posted @ 2019-11-27 13:55 _Zlrrr 阅读(167) 评论(0) 推荐(0)
摘要: React 是一个声明式 高效灵活的用于构建用户界面的 JavaScript 库 用 react 组件可以拼出复杂的 UI 界面 render 返回值描述的是希望在界面上看到的内容 返回的是一个 react 元素 constructor 要定义 state 的时候必须用到 constructor s 阅读全文
posted @ 2019-11-04 18:23 _Zlrrr 阅读(224) 评论(0) 推荐(0)
摘要: 语法: Object.defineProperty(obj, prop, descriptor) 数据劫持 obj: 在此上定义对象 prop: 定义或修改的属性名称 descriptor: 被定义或修改的属性描述符 返回值 -> 被传递给函数的对象 (可以重写 get set 方法) var Bo 阅读全文
posted @ 2019-11-01 11:26 _Zlrrr 阅读(127) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 ··· 87 下一页