I see, so it has to do with type conversion.
That's one more thing I don't really understand about this language, types... Is it just me or is every variable of type 'var'? And you don't need to specify any type (int, string, etc) in function arguments either, or what kind of type your function returns.
I'm used to Object Oriented languages like VB.NET and C#.NET, where you need to declare each type explicitly. There, using anything such as "5" == 5 will simply error; you cannot compare apples to oranges (or strings to integers for that matter)...
Oh well, I don't think I'll ever be using jscript for anything else so I shouldn't whine