2

We're boggling our ind over a syntax error that obstructs a calculating script in IE10 and below. It traditionally works fine in every other browser.

The error says:

SCRIPT1002: Syntax error (line 11, char 12)
const handler = function (event) {

Anyone has an idea where things get wrong please?

cptstarling
  • 711
  • 6
  • 10

2 Answers2

2

const was new in IE11, it is not supported in IE10.

Consider using the ALL_CAPS convention to show that the variable should not be changed. link

var HANDLER = function (event) {
Community
  • 1
  • 1
tcigrand
  • 2,220
  • 2
  • 11
  • 23
0

Thanks, I found out that when I replace const with var in this script, the error is solved and that the script runs ok.

cptstarling
  • 711
  • 6
  • 10