IE Javascript Problem with Constants

  • Thread starter Thread starter Jerry Baker
  • Start date Start date
J

Jerry Baker

It seems that IE6 has a real problem with the following JavaScript:

const a = 1;

Apparently you cannot declare a constant in Javascript by using the
"const" keyword. Can some tell me how to declare a constant that will
work in IE6?

Thanks.
 
Rob said:
var a = 1;
np.

That's not a constant. I need it to be impossible to modify after
declaration. I suppose it's just another thing in the list of IE's
deficiencies. I just thought I might be doing something wrong.

The real problem is that when IE encounters JavaScript which contains
constants, it will not execute any of the script at all. Boneheaded.

EXAMPLE:
 
Back
Top