What is the purpose of having a void operator in JavaScript that just returns undefined, instead of just having people use the value undefined directly? I could understand some kind of, evaluating expressions with side effects, but most people just use void with 0.
I've seen some people using void operator in their code. I have also seen this in href attributes: javascript:void(0) which doesn't seem any better than javascript:;
So, what is the justification of using the void operator?