1. var num=10;
    2. function num(){
    3. console.log("hello world");
    4. }
    5. console.log(num); //10
    1. ![image.png](https://cdn.nlark.com/yuque/0/2021/png/22615031/1632878989204-90d704f4-994d-4f3f-9299-de2f5254dd12.png#clientId=u168d1c82-b332-4&from=paste&height=151&id=u5a70e07e&margin=%5Bobject%20Object%5D&name=image.png&originHeight=302&originWidth=674&originalType=binary&ratio=1&size=10052&status=done&style=none&taskId=u9578815e-03ed-47b8-88ce-fe79a2bb348&width=337)
    1. function num(a){
    2. //var a=20
    3. console.log(a);
    4. var a=10;
    5. function a(){
    6. console.log("hello world");
    7. }
    8. console.log(a);
    9. }
    10. num(20);

    image.png