Javascript reserved keyword

I ran into a weird problem with Safari today. I named one of my function name ‘goto’ and Safari was complaining about javascript parsing issue while it worked fine on all other browsers. Beware of the reserved keywords even when they are not being used. ‘goto’ is actually reserved only for future use. This one is not as obvious as ‘int’, ‘integer’ etc. Take a look at the documentation at Mozilla site for detailed list of reserved keywords.

There’s other ones like :
abstract, debugger, transient, volatile, implements, protected, synchronized


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s