JavaScript · Junior · Question 65 of 75

When does a finally block run?

Explanation

It is the place for cleanup such as hiding a loader or closing a connection. A return inside finally overrides the earlier return value, so avoid it.

Further reading

Problem with a question

JavaScript · Junior · question 65

Test yourself

Take the JavaScript · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz