Advertisement
Guest User

Untitled

a guest
Sep 15th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta name="description" content="[add your bin description]">
  5. <meta charset="utf-8">
  6. <meta name="viewport" content="width=device-width">
  7. <title>JS Bin</title>
  8. </head>
  9. <body>
  10.  
  11. <script id="jsbin-javascript">
  12. // Fuzione calcolo secondi a partire dalle ore
  13.  
  14. "use strict";
  15.  
  16. function hoursToSeconds(hours) {
  17. return hours * 3600;
  18. }
  19. var ore = prompt("inserisci ore");
  20. var result = hoursToSeconds(parseInt(ore));
  21.  
  22. console.log(result);
  23. </script>
  24.  
  25.  
  26.  
  27. <script id="jsbin-source-javascript" type="text/javascript">// Fuzione calcolo secondi a partire dalle ore
  28.  
  29.  
  30. function hoursToSeconds(hours){
  31. return hours*3600;
  32. }
  33. var ore = prompt("inserisci ore");
  34. var result = hoursToSeconds(parseInt(ore));
  35.  
  36. console.log(result);</script></body>
  37. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement