Quick definition · 2 min Coding term
Environment variable
An environment variable is a setting stored outside your code, used for secrets and config like API keys.
Think of it like
A sealed note taped to the machine, not written into the script, so secrets never end up in your shared code.
Example
You keep your API key in an environment variable named OPENAI_API_KEY instead of pasting it into a file.
Why it matters
It is a massive beginner stumbling block, and the right way to keep secrets out of your code and out of GitHub.
Where you’ll see it
Vercel.env filesyour hosting dashboard