In Flex ActionScript, a new object can be instantiated via the parameterless constructor with or without ()
. Example:
var array:ArrayCollection = new ArrayCollection()
or
var array:ArrayCollection = new ArrayCollection
Is there a difference between the two? Is one preferred over the other?
I think there is no difference functionally, but I like having the () just because of convention.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With