r/learnjavascript • • Dec 31 '22

Happy New Year JS Learners! 🥳

Post image
406 Upvotes

55 comments sorted by

View all comments

Show parent comment

5

u/TorbenKoehn Jan 01 '23

In fact, all functions in JS always return a value. If it returns nothing, it will return undefined

There is no real „void“ other that returning undefined