целое число





js/script.js
  • var val0 = 5;
  • var val1 = Number();
  • val1 = 10;
  • var val2 = Number(15);
  • var valOct = 017;
  • var valHex = 0xF;
  •  
  • function funMake() {
  •  document.write(val0 + '<br />');
  •  document.write(val1 + '<br />');
  •  document.write(val2 + '<br />');
  •  document.write(valOct + '<br />');
  •  document.write(valHex + '<br />');
  •  document.write(typeof(val0) + '<br />');
  • }
var val0 = 5;
var val1 = Number();
val1 = 10;
var val2 = Number(15);
var valOct = 017;
var valHex = 0xF;

function funMake() {
 document.write(val0 + '
'); document.write(val1 + '
'); document.write(val2 + '
'); document.write(valOct + '
'); document.write(valHex + '
'); document.write(typeof(val0) + '
'); }


index.html
  • <!DOCTYPE html>
  • <html>
  • <head>
  •  <meta charset="utf-8" />
  •  <title>New Page</title>
  •  <script src="js/script.js"></script>
  • </head>
  • <body>
  • <script>
  •  funMake();
  • </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();
  • </script>
  • </body>
  • </html>