From what I understand, the keyword void
in Javascript is some kind of function that takes one argument and always returns the undefined
value. For some reason you need to pass it an argument; it won't work without one.
Is there any reason why it requires this argument?
What is the point? Why won't it work without an argument. The only use I have seen for it is to produce an undefined
result. Are there any other uses for it?
If not then it would seem that the requirement for an expression to be passed would be pointless.