What are Postman variable scopes and how do you use environments?
beginner 0–2 yrs
Postman resolves variables from the narrowest scope outward: local, data (iteration), environment, collection, global. Use environments for per-stage values like baseUrl and credentials, collection variables for values shared by the collection, and keep secrets out of shared initial values.
Full answer with examples