вещественное число





js/script.js
  • var val0 = 3.14;
  • var val1 = Number();
  • val1 = 2.75;
  • var val2 = Number(7.47);
  • var val3 = 7.45e-5;
  •  
  • function funMake() {
  •  document.write(val0 + '<br />');
  •  document.write(val1 + '<br />');
  •  document.write(val2 + '<br />');
  •  document.write(val3 + '<br />');
  •  document.write(typeof(val3) + '<br />');
  • }
var val0 = 3.14;
var val1 = Number();
val1 = 2.75;
var val2 = Number(7.47);
var val3 = 7.45e-5;

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


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>