Coder Social home page Coder Social logo

es6study's Introduction

从0开始基础+实战学习es6

第一课 基本特性了解

  • 模板字符串
  • 解构赋值
  • 箭头函数
  • set,map
  • 异步操作
  • 类与对象
  • 模块化

第二课 es6语法

作用域的概念
let与const的使用
  • 在代码中用{}包起来的可以理解为一个块作用域,let的适用范围就是块作用域
let a = 1;
let a = 2;//这种情况下控制台会报错,原因是使用let定义的变量不能重复定义。
function last (){
 const PI = 3.1415926;
 PI = 8;//这时候代码也会报错,原因是使用const定义的变量是不可以被修改的,但是对象这种引用类型是可以修改的,因为引用类型定义的是一个指针,对象的值改变,但是指针不变。const也是在块作用域下使用的
}
  • 解构赋值
    • 什么是解构赋值,左右两种结构一一对应赋值

es6study's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.