What is Environment Variable?
developer
Environment variables hold configuration — database credentials, API keys, app mode — outside the codebase. Secrets never belong in Git; they belong in the environment the application reads at runtime. Keep .env out of version control and set per-environment values in the hosting panel.
The short answer above covers the decision most buyers are making. The main entry for environment variable carries the complete definition, a usage note and the terms most often confused with it, so the two pages together answer both the quick question and the follow-ups.