Re: Cookie problem! Getting error when passing the expire date.
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: Cookie problem! Getting error when passing the expire date.

From: Richard Cornford <Richard@litotes.demon.co.uk>
Date: Sun Apr 30 2006 - 22:31:44 CEST

VK wrote:
> Lasse Reichstein Nielsen wrote:
>> I guess it's a matter of definition whether "" represents
>> a number (that would be 0 then) or not. The "Number" function
>> appears to think it does.
>
> Not the Number only, but the whole language itself, welcome
> to the JavaScript world.

Yet another example of your stringing words together and producing a
result that says nothing.

> Are we aware of runtime typezation? ;-)

Are 'we' making up our own terminology agian?

> alert("" == 0); // true

That is the specified (and so expected) result. The type-converting
comparison will tend to do numeric comparisons so (as Lasse stated) the
fact that the empty string type-converts to numeric zero makes this
comparison true.

> btw and AFAIK Number is supposed to be used as constructor,
> not as a method.

One of the main things you would benefit from learning is an
appreciation of how very little you actually do know. See ECMA 262, 3rd
Ed. Section 15.7.1 "The Number Constructor Called as a Function", and
appreciate that a function should not be spoken of as a 'method' unless
it is called as a member of an object.

Richard.
Received on Mon May 1 05:28:07 2006