Javascript alert is bad
Hi,
Just a quick post. I just decided to NEVER use the javascript alert function for debugging again.
Just a quick post. I just decided to NEVER use the javascript alert function for debugging again.
- It's a pretty crude method of debugging.
- If you get an alert in a loop, get ready to close 100 pop ups. (Some browsers are cool about this)
- Oops, I forgot to take it out when I deployed to the test system. (Like I just did)
- There are probably other reasons, like what happens when you test your code outside of a browser?
Anyway, I already have a wrapper around console.log() that will be graceful if console.log is not available, so I need to remember to use that instead and forget about alert()!
Comments
Post a Comment