Which href attribute is preferable for JavaScript links: '#' or 'javascript:void(0)'?

I am trying to decide between two approaches for creating a link intended solely for executing JavaScript code. I’m curious about which one offers better performance, usability, and adheres to validation standards. Here are the two examples I am considering:

function invokeJs() {
    alert("invokeJs");
}
<a href="#" onclick="invokeJs();">Execute JavaScript</a>

and

<a href="javascript:void(0)" onclick="invokeJs();">Execute JavaScript</a>