My goal is to use ES6+, And still support Explorer 11.
I understand Babel provides the answer to purpose.
On the official website of Babel: https://babeljs.io/
I wrote an example:
I would expect the output of Babel will be :
var a = 5;
what am I missing?
Thank you all!
Babel by default uses browserslist with no polyfills. Those you will need to configure manually. If you want to toy around online, try using https://babeljs.io/repl, and make sure to enable everything according to your needs in the left sidebar.