The void operator is often used to obtain the
undefined primitive value.
In this case, it is used to avoid
# in the URI bar.
hrefs value will be
undefined. Hence, when user clicks on the
Click Me link, the URI will remain the same in the address bar.
<a href="#" onclick="return false;"> Click Me </a>
<a href="#" onmousedown="return false;"> Click Me </a>
The return false prevents the page from being navigated and unwanted scrolling of a window.