Is there a polyfill for es6 arrow function?

Rana picture Rana · Sep 22, 2017 · Viewed 21.3k times · Source

Is there a polyfill for es6 arrow function?

the following code throws syntax error exception in IE, is there a polyfill to make IE support arrow functions?

var myFunc = ()=>{
    alert('es6');
}
myFunc();

Note: I don't want to use any transpiler.

Thanks in advance

Answer

Pablo Lozano picture Pablo Lozano · Sep 22, 2017

A polyfill can add or fix missing built-in classes, functions, objects... but it cannot modify a compiler's accepted syntax.