自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(5)
  • 收藏
  • 关注

原创 ES6-函数扩展

{ //默认值 带默认值的参数放最后 function test(x,y=‘123’) { console.log(x,y); } test(‘000’);//000123 test(‘000’,‘000’);//000000 } { function test2(…argy) //把参数转换为数组 { for(let v of argy) { console.log(v); } } test2...

2019-09-24 18:31:53 62

原创 ES6-数组扩展

//遍历数组的下标 for(let index of [1,2.3].keys()) { console.log(index);//0,1,2 } //遍历数组的值 for(let index of [1,2.3].values()) { console.log(index);//1,2,3 //需要引入babel-polyfill } //遍历数组的值和下标 for(let [index,val...

2019-09-24 17:55:13 88

原创 ES6-数值

{ console.log(‘15’,Number.isFinite(15));//判断一个数值是否有尽 true console.log(‘NaN’,Number.isFinite(NaN));//false console.log(‘NaN’,Number.isNaN(NaN));//判断是否不是数字true } { console.log(Number.isInteger(25));//判断...

2019-09-24 15:31:44 73

原创 ES6-字符串操作

{ let str = ‘string’; console.log(str.includes(‘c’));//判断字符串有没有某个字符 false console.log(str.startsWith(‘str’));//判断字符串是不是以某个字符起始 true console.log(str.endsWith(‘ng’));//判断字符串是不是以某个字符结束 true } { let str =...

2019-09-24 14:54:18 104

原创 ES6-let和const

let和const 在块区域有效 function test() { for(let i = 1;i<3;i++) { console.log(i) //输出 1 、2 } console.log(i);//输出i is not defined } test(); const 声明的时候必须赋值

2019-09-24 11:54:25 60

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除