What happens if the browser does not support the version of JavaScript?

Question

In the context of this lesson, what happens if the browser does not support the version of JavaScript?

Answer

If the browser does not support the version of JavaScript used in the code, the consequences can range in severity depending on how much the code effects the page.

If there is a large dependency on ES6 syntax in the web page’s script code, then the page may not work at all, and possibly even crash. For example, it may use a while loop where some variables are set using ES6 syntax, but the browser is unable to interpret it, so that it results in an infinite loop.

In other cases, there may not be any big issues at all, other than some part of the page not loading correctly or just some error message printed to the console.