Why do ES6 have compatibility issues?
Because the majority of users use the browser version at the time of release may be earlier than the ES6 and release, and today, if we use the new features of ES6 in programming, if the browser does not have a newer version, or the new version of the ES6 features are not compatible, then the browser certainly does not recognize our ES6 code, Like a browser doesn't understand what I'm writing about let and what is const? can only be an error. This is the browser compatibility issue with ES6.
How to troubleshoot compatibility issues with browsers
<script> var arr = ' I am an array '. Split ('); var [A,b,c] = arr; Console.log (a,b,c); </script>
First of all, ie example, in the absence of the use of tools to convert in the IE browser will error
This is ES6 's grammatical error.
Testing found a tool to convert ES6 to ES5 syntax for compatibility
1. Introduction of <script src= "Https://cdn.bootcss.com/babel-standalone/6.26.0/babel.min.js" ></script>
2. Add the script tag on the package ES6 syntax
<script type= "Text/babel" ></script>
In this case, on IE can be executed, the effect is as follows:
About compatibility issues with ES6