About
The environment is the technical name for all the variables—and their values—that exist in the program at a given time.
OS environment variable gives the environment for the whole process and therefore are global whereas the code variable follows a scope rule (Only available in a block or a function, etc …).