Úlohy

<!DOCTYPE html>
<html lang="cs">
<head>
    <meta charset="utf-8" />
    <title>Titulek</title>
 
    <style>
 
   textarea {width: 100%; height: 10em; font-size: 3vw;}
    </style>
 
 <script>
  function vypocti(){
  const vstup = document.getElementById('vstup').value
  const poleRetezcu = vstup.split("\n")
  const poleCisel = poleRetezcu.map(x => parseFloat(x))
  console.log(poleCisel)
  console.log(poleCisel[0] + poleCisel[1])
  }
 </script>
</head>
 
<body>
<textarea id="vstup">
</textarea>
<input type="button" onclick="vypocti()" value="Spocti">
 
</body>
</html>