ES6 -- Babel編譯器

Babel編譯器:


Babel用來將ES6語法轉成ES5語法, 因為IE10和11部分支援ES6, 因而Babel可用作跨瀏覽器使用。 ( IE 8~10不支援ES6 )

而ES6有向下相容特性, 也就是說, 即使寫的不是ES6, 而是ES5語法, 仍會支援ES5的語法。

如果不確定目前瀏覽器是否支援ES6, 建議還是寫ES5, 或是再加寫能跨版本支援的code。



留言

  1. 作者已經移除這則留言。

    回覆刪除
  2. Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here
    Thank you. Your blog was very helpful and efficient For Me,Thanks for Sharing the information Regards..!!..AngularJS Online Training Bangalore

    回覆刪除

張貼留言

熱門文章