0

What is lexical scoping in javascript?

14th Apr 2020, 7:57 PM
Manish Sunuwar
Manish Sunuwar - avatar
2 Answers
+ 6
 A lexical scope in Javascript means that a variable defined outside a function can be accessible inside another function defined after the variable declaration. . So, the add() function is accessing the global variable x which is defined before method function add
14th Apr 2020, 8:02 PM
SHADOW 🌀
SHADOW 🌀 - avatar