0
JS void keyword?
What is void keyword? How to use?
1 Resposta
0
Void is keyword which can be used as a unary operator that appears before its single operand, which may be of any type. This operator specifies an expression to be evaluated without returning a value.
The most common use of this operator is in a client-side javascript: URL, where it allows you to evaluate an expression for its side-effects without the browser displaying the value of the evaluated expression.
Ex.:
<a href="javascript:void(alert('Warning!!!'))">Click me!</a>