An error will occur if one tries to use a variable that is referred outside of its lexical environment, which includes the variables that functions utilize. Hence, the given statement is true.
An identifier-variable mapping is stored in a data structure called a lexical environment. The term "identifier" in this context refers to the names of variables and functions, whereas the term "variable" is a reference to a real object, either a function object or primitive value.
A lexical environment is basically a place where one writes. The location of where they write our code matters because, as one have previously seen, the Javascript engine examines it line by line.
Therefore, the given statement is true.
Learn more about lexical from here:
https://brainly.com/question/13211785
#SPJ1