What is javascript void(0)
javascript void(0) is an operator that executes an expression without reloading the web page and removes unwanted effects from the web page. It always returns an undefined primitive value. The void(0) is mainly used with a hyperlink to prevent the web page from refreshing. This means that we can use it as javascript: void(0) in href does not have any URL but It will be performed on executing another expression. syntax – 1 <a href=”javascript:void(0)”>Link Text</a> Sntax – 2 <a href=”javascript:void(expression)”>Link Text</a> The void(0) can accept an expression and return its result as well as an undefined value. Example – … Continue reading