Mascara: Next Generation JavaScript compiler

Try it Download Buy About Documentation Blog Contact

'void' keyword

The void keyword is used in a function signature to indicate that the function does not return any value.

Example:

function changeTitle(newTitle : String) : void {
    document.title = newTitle;
}

Se also function.

The void keyword can only be used as a function return type. Parameters or variables cannot be declared to be of type void since it wouldn't make sense.

X Try!
Mascara JavaScript Generated JavaScript

Translating...
Show compiler settings