Need Expected Identifier IE

This works in firefox, but IE says I need an Expected identifier with

fullname_msg.for = ‘fullname’;

IE specifically shows that it doesn’t like for. Any reason why this happens?

There are ‘reserved’ words in javascript that many browsers will not allow to be used as identifiers in methods or property names.
Some browser implementations allow some of them, others add their own reserved words. I just avoid them.

There are some ‘safe’ aliases-
‘htmlFor’ for ‘for’, ‘className’ for ‘class’ and ‘styleFloat’ or ‘cssFloat’ for ‘float’ are common examples.

abstract,boolean,break,byte,case,catch,char,class,const,continue,
debugger,default,delete,do,double,else,enum,export,extends,false,
final,finally,float,for,function,goto,if,implements,import,in,
instanceof,int,interface,let,long,native,new,null,package,private,
protected,public,return,short,static,super,switch,synchronized,this,
throw,throws,transient,true,try,typeof,var,void,volatile,while,with,yield;

So for it to work properly without a reserved word clash it needs to be written as:

fullname_msg.htmlFor = ‘fullname’;