Don't use javascript alerts and freak out your clients. Use Google Chrome's console to log run time messages. Here is the simple javascript method:
javascript: console.log('hello world');
This provides an unobtrusive way to understand what your javascript script is producing while your clients or audience is looking at your site.
While viewing your website in Google Chrome, right click anywhere on the webpage and select Inspect Element. This will open Google Chrome's Developer Tools at the bottom of the screen. The last tab is called Console. Click the Console tab to see your messages.