aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes double slash Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "double slash" Watch "double slash" New topic
Author

double slash

Dhaval J. Patel
Ranch Hand

Joined: Mar 10, 2011
Posts: 90

Howdy folks,

This is sort of strange, might be a silly question or might even turn out to be nothing. But does anyone know what the double slashes between a javascript declaration are for ?

To make it more confusing, some of the declarations also have "var" which follows the double slash


My first guess was that it might be commenting out the entire script. But no ! It runs just fine.

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60992
    
  65

There is no reason for any of that to be there. It's complete nonsense. The browsers ignore any content in script tags that use the src attribute.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Dhaval J. Patel
Ranch Hand

Joined: Mar 10, 2011
Posts: 90

Thanks Bear. I just joined this company and was browsing code and this thing was bugging me haha. Anyways, thanks for the quick answer..
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60992
    
  65

I'd be very cautious about what else you might find in such code!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: double slash