Giter Club home page Giter Club logo

es6-api's Introduction

虽然es6现在还没有普及,但是未来一定会全面推广es6的。早学晚学都得学,特地新建一个仓库来熟悉es6的语法。文档中大部分的案例都来自阮一峰老师的书籍《ECMAScript 6入门》,膜拜大神。虽然现在最新的chrome55已经支持了80%的es6语法,业界良心,但是在这个浏览器百花齐放的年代,我们还是得用其他工具进行转义,将es6的代码转义成es5代码为大多数现代浏览器识别,我这里使用的工具是babel的浏览器版本(browser.js),当然你们可以使用google的Traceur转码器。这里简单介绍下browser.js的使用。另外babel还有配合node的服务端版本,以及配合webpack打包版本,而且现在react也是用babel来进行转义,大家可以在网上查看其它资料。

使用方法:先引入browser.js文件,然后设置要使用es6语法的 script 标签设置 type=" text/babel "

<script src="browser.js"></script>
<script type="text/babel">
// Your ES6 code
</script>

es6-api's People

Contributors

shenfq avatar

Stargazers

 avatar

Watchers

 avatar  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.