What is the use of Void(0)?

What is the use of Void(0)?

The void operator evaluates the given expression and then returns undefined .

The void operator is often used merely to obtain the undefined primitive value, usually using “ void(0) ” (which is equivalent to “ void 0 ”). In these cases, the global variable undefined can be used instead (assuming it has not been assigned to a non-default value).