Returning nothing with Void

In this lesson, you will learn how to explicitly mention something that does nothing.

Void means nothing. However, undefined can be assigned to void. The operation of setting undefined to void is not useful per se. However, a function that returns nothing should be marked with the reserved void keyword.

Get hands-on with 1200+ tech skills courses.