综合题5_选择判断.html 985 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>Document</title>
  7. </head>
  8. <body>
  9. <script>
  10. // function foo(){
  11. // var a = 1;
  12. // }
  13. // function bar(){
  14. // var a = "hello";
  15. // }
  16. // console.log(a);
  17. // function baz(){}
  18. // var foo2 = function(){}
  19. // function(){};
  20. // var b = 1;
  21. // var b = "a";
  22. // var a = "hello";
  23. // function foo(){
  24. // var a = 10;
  25. // function foo2(){
  26. // console.log(a);
  27. // }
  28. // foo2();
  29. // }
  30. // foo();
  31. // foo2();
  32. function foo(){
  33. function foo2(){
  34. console.log("hello");
  35. }
  36. return foo2;
  37. }
  38. var foo3 = foo();
  39. console.log(foo3);
  40. foo3();
  41. </script>
  42. </body>
  43. </html>