13. <script type=‘text/javascript’> var scope = ‘global’; function checkscope() { var scope = ‘local’; alert(scope); } checkscope(); // => local alert(scope); // => global </script> 変数の宣言 - var
14. <script type=‘text/javascript’> var scope = ‘global’; function checkscope() { scope = ‘local’; alert(scope); } checkscope(); // => local alert(scope); // => local </script> 変数の宣言 - varの省略