469,325 Members | 1,372 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,325 developers. It's quick & easy.

Diagram showing an overview of Javascript type conversion

Hi:

There is an introductory diagram for those confused by
javascript type wrangling (i.e., runtime type conversion
by the javascript interpreter).

http://mollypages.org/misc/jstypes.mp

It's not comprehensive but covers most common scenarios.

Best regards,
--j
Mar 25 '08 #1
2 2161
java schreef:
Hi:

There is an introductory diagram for those confused by
javascript type wrangling (i.e., runtime type conversion
by the javascript interpreter).

http://mollypages.org/misc/jstypes.mp

It's not comprehensive but covers most common scenarios.

Best regards,
--j
type Status report

message /misc/jstypes.mp

description The requested resource (/misc/jstypes.mp) is not available.
Mar 26 '08 #2
java wrote:
There is an introductory diagram for those confused by
javascript type wrangling (i.e., runtime type conversion
by the javascript interpreter).

http://mollypages.org/misc/jstypes.mp

It's not comprehensive but covers most common scenarios.
On that diagram the statement "null and undefined convert to NaN so they
always return false when compared to a different type" is not true. The
algorithms for type-converting comparison do not type-convert null and
undefined values at all, and no type-conversation would result in null
becoming NaN (it become zero if type-converted into numbers (and so
would be equal to zero if type-conversion was part of the comparison
process)).

The "Comparison is intuitive" comment when both sides of comparisons are
the same type does not take account of the fact that - NaN == NaN - is
false (and - NaN != NaN - true).

Richard.
Mar 26 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Ara.T.Howard | last post: by
136 posts views Thread by Matt Kruse | last post: by
1 post views Thread by Maria | last post: by
3 posts views Thread by Lee Crabtree | last post: by
2 posts views Thread by Josť Joye | last post: by
5 posts views Thread by Flak | last post: by
9 posts views Thread by crater | last post: by
1 post views Thread by Jennifer Jazz | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by Gurmeet2796 | last post: by
reply views Thread by harlem98 | last post: by
reply views Thread by listenups61195 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.