1. What is a closure in JavaScript?
2. You are given an array of prices where prices[i] is the price of a given stock on the ith day. You want to maximize your profit by choosing a single day to buy one stock and choosing a different day in the future to sell that stock. Return the maximum profit you can achieve from this transaction. If you cannot achieve any profit, return 0.
3. What is accessibility? Explain with examples in web development.
4. Explain the debounce technique in React.