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

Advertisements

Leave a Reply

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

WordPress.com Logo

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

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s