How to check if a javascript function exists or is defined?

To check if a Javascript function exists before calling it, try this:

If you want to reduce the number of strings hanging around in your code, try this instead

Leave a Reply

Your email address will not be published. Required fields are marked *