[ES6] 20. Polyfills

Polyfill is something you don't need to set up traceur but start to use es6 in today's browser.
You can search for polyfill which you want to use on Goolge.

For example: I want to search for es6 array method from [https://github.com/rwaldron/es6-array-extras](https://github.com/rwaldron/es6-array-extras).

Download the js file and include it.

 

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>

<script src="es6-array-extras.js"></script>
<script>
    var ary = Array.of(5);
    console.log(ary);
</script>
</body>
</html>

 

posted @ 2015-04-29 03:24  Zhentiw  阅读(285)  评论(0编辑  收藏  举报