аргументы функции





js/script.js
  • function funMake(agr0, arg1, arg2) {
  •  var res = agr0 + arg1 + arg2;
  •  document.write(res + '<br />');
  • }
function funMake(agr0, arg1, arg2) {
 var res = agr0 + arg1 + arg2;
 document.write(res + '
'); }


index.html
  • <!DOCTYPE html>
  • <html>
  • <head>
  •  <meta charset="utf-8" />
  •  <title>New Page</title>
  •  <script src="js/script.js"></script>
  • </head>
  • <body>
  • <script>
  •  funMake(10, 20, 30);
  •  funMake(10, 20, null);
  •  funMake(10, null, null);
  • </script>
  • </body>
  • </html>
  • <!DOCTYPE html>
  • <html>
  • <head>
  •  <meta charset="utf-8" />
  •  <title>New Page</title>
  •  <script src="js/script.js"></script>
  • </head>
  • <body>
  • <script>
  •  funMake(10, 20, 30);
  •  funMake(10, 20, null);
  •  funMake(10, null, null);
  • </script>
  • </body>
  • </html>