Javascript void is an operator for return a
Here is a typical hyperlink:
<a href="http://https://convert.idontcarewhatyouthink.net">Home</a>
Home, If you click the link, the home page will be loaded.
We can use a hyperlink execute javascript, rather than loading a new web page:
<a href="javascript: alert('JS');">JS Link</a>
JS Link
Use
<a href="javascript:void(x=5);alert(x);">JS Link</a>
Link
<a href="javascript:void(0)" ondblclick="alert('dblclick')">Link</a>
Link
Without
<a href="" ondblclick="alert('dblclick')">Link</a>
Link