What to use when declaring a variable as shown below:
private var someVar:*;
OR
private var someVar:Object;
What is the difference between the two? What makes the other better than the other in different situations? Any examples?
Thank.
someVar:*is a special untyped var that contains a default value undefined, and
someVar:*
undefined
ObjectThe default value of var is equal null.
Object
null
This is the only key difference.
From Adobe Documentation
private var someVar:*; private var someVar:Object;
ActionScript . true ActionScript 3.0, . . , , (*) , . , :