локальная переменная





index.html
  • <!DOCTYPE html>
  • <html>
  • <head>
  •  <meta charset="utf-8" />
  •  <title>New Page</title>
  • </head>
  • <body>
  • <script>
  •  function funMake() {
  •   var val = 'This is a local variable';
  •   return val;
  •  }
  •  document.write(funMake());
  • </script>
  • </body>
  • </html>
  • <!DOCTYPE html>
  • <html>
  • <head>
  •  <meta charset="utf-8" />
  •  <title>New Page</title>
  • </head>
  • <body>
  • <script>
  •  function funMake() {
  •   var val = 'This is a local variable';
  •   return val;
  •  }
  •  document.write(funMake());
  • </script>
  • </body>
  • </html>