codedamn

Variable shadowing

Created by Codedamn about a year ago

0

No description provided

2 Comments

    0

    I think the suitable title for this video is instead of "Variable shadowing" it should be "Variable LookUp".

    @afzalkhn17

    Afzal Khan

    @afzalkhn17

    0

    Both globally created variable and the same variable can be created inside the function both the values can be console logged const myAge= 22; function printMyAge() { const myAge = 25; console.log(myAge); } printMyAge(); console.log(myAge);

    the result of the code will be 25 and on the next line it will be 22

    @kp97

    Krishnaprasad

    @kp97

Your comment