JavaScript Void Operator

Yadav, Niteesh
JavaScript in Plain English
2 min readFeb 21, 2020

--

BG Photo by John Daines on Unsplash

JavaScript has a unary void operator. It evaluates the given expression and then returns undefined.

void expression

It evaluates a JavaScript expression without returning a value. It discards the functions default return value and explicitly returns undefined.

--

--