0

I just want to know at what situation I need to use 'void(0)'. When I happen to use this 'void(0)' in javascript code? Any help?

javascript:void(0);
CodingIntrigue
  • 71,301
  • 29
  • 165
  • 172
Sakthivel
  • 668
  • 2
  • 6
  • 18
  • create leader picture... – Thennarasu Feb 16 '15 at 12:47
  • Never. [*void*](http://ecma-international.org/ecma-262/5.1/#sec-11.4.2) is an operator, not a a function, so the grouping operator is redundant. `void 0` is sufficient and generally used as a short way to write `undefined` (it saves 3 characters and avoids use of the identifier *undefined*, which may have been assigned some value other than the *undefined* value). – RobG Feb 16 '15 at 12:49

0 Answers0