摘要:
一、git账号配置 查看git配置 git config --list (查看user.email=***@emial 是否为自己账号) 全局配置git账号 git config --global user.name 你的名字 git config --global user.email 你的账号 阅读全文
摘要:
不允许对 function 的参数进行重新赋值 /* eslint no-param-reassign: ["error", { "props": false }] */ 屏蔽当前行校验 不允许对 function 的参数进行重新赋值 /* eslint no-param-reassign: ["e 阅读全文
摘要:
// 是否支持复制 export const isSupportCopy = ((!!document.queryCommandSupported) && document.queryCommandSupported('copy')); const copyTempElement = documen 阅读全文
摘要:
function a() { var arr = new Array(1000000); for(var i = 0; i < arr.length;i ++) { arr[i] = i; } var start1 = new Date().getTime(); for(var i = 0; i < 阅读全文
摘要:
2.对象数组去重 const arr = [{id: 1},{id: 2},{id: 3},{id: 2}]; const hash = {}; const arrResult = arr.reduce((preVal, curVal) => { hash[curVal.id] ? '' : has 阅读全文
摘要:
function test() { var name = 'alice'; return { getName : function() { console.info(name); }, setName : function(newName) { name = newName; } }};var pe 阅读全文
摘要:
var Person = { name : 'alice', say : function(txt1,txt2) { console.info(txt1+txt2); console.info(this.name); }}var Dog = { name : 'tom', say : functio 阅读全文
摘要:
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width"> <title>css画圆</title> <style> #test { width:30 阅读全文
摘要:
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scal 阅读全文
摘要:
var s = 1; function test() { console.info(s); var s = 2; console.info(s); } test(); >>>undefined >>>2 阅读全文