Get a clear and concise explanation of JavaScript closures with a simple code example.
Task: Explain the concept of a JavaScript closure. Context: Assume the audience is a junior developer with basic JavaScript knowledge. Constraints: Keep the explanation concise and include a simple, easy-to-understand code example. Format: Provide the explanation followed by the code snippet.
Generate a detailed, phased migration plan for converting a legacy JavaScript codebase to TypeScript, addressing common challenges and best practices.
Generate a strategic plan to significantly improve the loading speed and runtime performance of a web application.
Provide a basic HTML structure for a specific section of a web page, such as a hero or contact form.