Hi,
In the first, you are assigning a Number to myVar first, and then saying
'just kidding' you are a string. In the second, you are assigning a number
(which was converted from a string) to myVar.

I would declare the type of the variable, eg var myCounter:Number = 0; 

Grtz
Hans

 
____________
 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Toon Van de
Putte
Sent: Wednesday, January 25, 2006 2:23 PM
To: Flashcoders mailing list
Subject: [Flashcoders] small code question

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
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to