Re: [Flashcoders] small code question

2006-01-26 Thread Morten Barklund Shockwaved

Fumio Nonaka wrote:

Using new Number is... silly. The Number-object is quite useless
and can't be used for anything, that a regular number can't. Use
normal numbers and use numbers:


The Number object can have a property, which a regular number can't.
I don't know if it is useful, though.


I know - that's why.. silly :)

It's useless. And it isn't even of primitive type number unless you 
invoke it's valueOf, which would automatically be invoked anyways in any 
calculations.


Number-, Boolean- and String-objects (not primitives) are silly and 
useless :)


--
Morten Barklund - Information Architect - Shockwaved
Gothersgade 49, 4th floor - DK-1123 Copenhagen K, Denmark
Phone: +45 7027 2227 - Fax: +45 3369 1174
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] small code question

2006-01-25 Thread Johannes Boyne
But why not? In the first example you say in the first line myVar =  new 
Number(); But not more, only that it is a number e.g not a string or a 
bolean. Than in the second line you say myVar = 0; So you give it a 
Number.
In the second example you do it in one way you say hey the variable 
myVar is a number and is a 0.


See you

Toon Van de Putte schrieb:

I was wondering if the following two lines of code are just different ways
of doing the same thing:

var myVar = new Number();
myVar =0;

var myVar= Number(0);

--
Toon Van de Putte
Pannenhuisstraat 63
2500 Lier
Belgium

mobile: +32 (0)497 52 74 51

[EMAIL PROTECTED]
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

  


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders