You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is already mentioned that eval only executes in the local scope when it is being called directly and when the name of the called function is actually eval.
So, Here we are not calling it directly so it will not change the value of Global variable number.
Hence Global variable number will remain same i.e - 1
varnumber=1;functiontest(){varnumber=2;varcopyOfEval=eval;copyOfEval('number = 3');returnnumber;}test();// 2number;// 3 (Here value of number will be 1 instead of 3)
Please Assign me this issue I want to contribute .
The text was updated successfully, but these errors were encountered:
In Why Not to Use eval Section
It is already mentioned that eval only executes in the local scope when it is being called directly and when the name of the called function is actually eval.
So, Here we are not calling it directly so it will not change the value of Global variable number.
Hence Global variable number will remain same i.e - 1
Please Assign me this issue I want to contribute .
The text was updated successfully, but these errors were encountered: