0

JS void keyword?

What is void keyword? How to use?

16th Mar 2017, 10:22 PM
Š’Š°Š»ŠµŃ€ŠøŠ¹ Š§ŠŗŠ°Š»Š¾Š²
Š’Š°Š»ŠµŃ€ŠøŠ¹ Š§ŠŗŠ°Š»Š¾Š² - avatar
1 Answer
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>
17th Mar 2017, 5:19 PM
Š’Š°Š»ŠµŃ€ŠøŠ¹ Š§ŠŗŠ°Š»Š¾Š²
Š’Š°Š»ŠµŃ€ŠøŠ¹ Š§ŠŗŠ°Š»Š¾Š² - avatar