How do you break a function in the middle?

Sometimes when you’re in the middle of a function, you want a quick way to exit. You can do it using the return keyword . Whenever JavaScript sees the return keyword, it immediately exits the function and any variable (or value) you pass after return will be returned back as a result.

Sizin İçin Seçtik  How do you skip iteration in forEach darts?

Leave a Reply

Your email address will not be published. Required fields are marked *