The void operator

The void operator will evaluate to undefined regardless of its operand. Its operand can be any valid reference or expression:

void 1; // => undefined
void null; // => undefined
void [1, 2, 3]; // => undefined

It doesn't have many uses nowadays, although void 0 is sometimes used as an idiom for undefined either for succinctness or to avoid issues in legacy environments where undefined was an untrusted mutable value.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.198.94