What is the return type in as3

I saw a method in an Action script that has a return type *

public function f(s:String):*

what does it mean [*]?

+3
source share
2 answers

The symbol *means untyped, which means that the type can be anything (and that the value can be undefined). Using an asterisk has the same effect as not specifying a type at all, but it is a good form to use it to be explicit in relation to your intention. For more details see Link link to the language .

+7
source

100% . "", * Object , , Object , Object. * undefined Object not. ! , , undefined, .

, , y undefined {x: null}, x , . :

var yesNoMaybe: *;

yesNoMaybe = true;
yesNoMaybe = false;
yesNoMaybe = undefined;
+8

Source: https://habr.com/ru/post/1730749/


All Articles