Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: ow to convert a decimal to a binary number?


Message #1 by "Colin Horne" <colinhorne@b...> on Fri, 21 Feb 2003 20:40:29 -0000
	:*) *blush*  You exagerate.  No, I'm not.  If you observe well, it's
not hard to see that what I did was just giving references :-)  I've 
just
got a fairly good memory.  I'm the kind of people who like to read a 
lot.
Actually, I've taken the time to look through all those references that 
I
always use.  No, I didn't read every line.  Of course not :-)  But I 
look
the titles, section titles and some important points to have a whole 
idea of
what I can possibly do.  And I also look at the names of methods of 
every
core object.  I don't think I can remember them, but I suppose they're
stored in some way in my subconscious memory.

	And thanks to OO nature of JavaScript, it's quite easy to find
answers.  Take your question as an example, I did look at the reference
before answering you :
First, I look at global functions (or core functions) but there's 
nothing
matching your need.
Then, since you're asking for a conversion from decimal to binary, it's
natural to look at Number object (because a decimal is a number) but 
not
String or Date or whatever.
Then, a conversion usually has a name of toXxxxx, and since a binary is 
most
of the time a string (or an array of number, but very few people would
implement like this), so I look at toString and there you're !

	HTH

> -----Message d'origine-----
> De : Colin Horne [mailto:colinhorne@b...]
> Envoy=C3=A9 : dimanche 23 f=C3=A9vrier 2003 19:58
> =C3=80 : javascript
> Objet : [javascript] RE: ow to convert a decimal to a binary number?
>
>
> Hey
>
> your a genius!!
>
> and a big genius at that, half the emails in this forum are
> done by you!!!
>
> thanks a lot
>
> colin horne
>

  Return to Index