Jump to content

Is register an illegal name for a function?


atrum

Recommended Posts

So I just happen to name a function as "register()" and when I go to run that function on an event I get back in firebug. "register is not a function". If I change that functions name by 1 character it works fine.

 

Below is an example of what I tried.

 

At first I thought that maybe register was a reserved keyword, but I am not able to find any documentation that supports that thought.

Can anyone confirm or deny this?

 

		
function tregister(){
alert("Works.");
}

		
function register(){
alert("Does not work.");
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.