The lexical scooping in JavaScript is based on which of the following?
A
Segments
B
Blocks
C
Functions
D
Entire code
Correct Answer: Functions
Lexical scoping (sometimes known as static scoping) is a convention used with many programming languages that sets the scope (range of functionality) of a variable so that it may only be called (referenced) from within the block of code in which it is defined. JavaScript has lexical scoping based on functions but not blocks.