
es6
周公子よ
菜菜菜菜鸟前端端端端
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
es6的class
class People { constructor(x,y){ this.x = x; this.y = y; console.log('sdsdsdf'); } tostring(){ return '(' + this.x + ',' + this.y + ')'; } } console.log(typeof People);//function console....原创 2019-11-18 10:05:36 · 122 阅读 · 0 评论 -
数值的扩展(es6)
/** 数值的扩展 */ /* isNaN() isFinite() */ console.log(isNaN(23));//false console.log(isNaN('23'));//false console.log(isNaN(undefined));//true console.log(isNaN(NaN));//true console.log(isNaN(null));//fa...原创 2019-11-08 15:46:51 · 110 阅读 · 0 评论 -
es6字符串扩展
let str = '中华上下五千年!'; for(let i of str){//这个是字符串的遍历 比 单纯的for要好 //console.log(i);//中华上下五千年! } //at 需要垫片库才能实现 但是我install了string.prototype.at但是,没有用,还是报错,有成功和我说一声哈 console.log(str.at(1)); //charA...原创 2019-10-31 17:12:15 · 150 阅读 · 0 评论 -
es6环境搭建、webpack环境简单搭建、webpack怎么引入Jquery,一系列问题的简单记录
搭建es6环境: 1、在终端输入 npm init -y,就会生成一个package.json 文件 2、install babel-perset-es2015 和 babel-cli (—save-dev) 3、自己弄一个文件目录,一个dist文件夹,存储转换后的es5文件,一个src文件,里面是自己写的es6文件 4、需要在根目录下有一个index.html文件,里面加上 ,说明index...原创 2019-10-31 10:44:30 · 382 阅读 · 0 评论