Void type
If your function does not return an explicit type, you will need to use void
as your return type.
void
is the absence of having any type at all.
Declaring variables of type void is possible; however, it is not useful because you can only assign undefined
or null
to them:
Last updated