All interview questionsIn JavaScript, when is lexical closure useful?IntermediateAnswerUse it for callbacks and encapsulated state.