ES6新特性

const 与 let 变量

模板字面量(``)

解构

const point = [10, 25, -34];
const [x, y, z] = point;
console.log(x, y, z);

对象字面量简写法

let type = 'quartz';
let color = 'rose';
let carat = 21.29;
const gemstone = {type,color,carat};
console.log(gemstone);

for...of循环&Iterator

let arr = ['a', 'b', 'c'];
let iter = arr[Symbol.iterator]();

iter.next() // { value: 'a', done: false }
iter.next() // { value: 'b', done: false }
iter.next() // { value: 'c', done: false }
iter.next() // { value: undefined, done: true }

展开运算符

{name:'lilei',...student}//修改值
[...fruits,...books]//合并数组

箭头函数

默认参数函数(default值)

Class类组件

本质是函数

super 和 extends

Modules

Set与Map

Generator函数

function* helloWorldGenerator() {
  yield 'hello';
  yield 'world';
  return 'ending';
}
var hw = helloWorldGenerator();

async&await

var asyncReadFile = async function (){
  var f1 = await readFile('/etc/fstab');
  var f2 = await readFile('/etc/shells');
  console.log(f1.toString());
  console.log(f2.toString());
};

类的修饰

@testable

fetch(代替了XMLHttpRequest)

fetch(url, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify(data)
});
  .then((response) => response.json())
  .catch((error) => console.log(error))

call,apply,bind

call参数,apply数组,bind修改this指针指向

事件冒泡

全部评论

相关推荐

点赞 评论 收藏
分享
2024-12-29 19:48
河北科技大学 Java
没事就爱看简历:问题不在于简历:1、大学主修课程学那么多应用语言,作为计算机专业是很难理解的。 2、技能部分,每一个技能点的后半句话,说明对熟练,熟悉的标准有明显误会。 3、项目应该是校企合作的练习吧,这个项目你负责什么,取得了哪些成果都没有提及,只是列举了你认为有技术含量的点,而这些都有成熟的实现。
点赞 评论 收藏
分享
评论
1
1
分享

创作者周榜

更多
牛客网
牛客企业服务