JSFiddle - React, Tailwind, and code Playground

HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="összeado.css"type="text/css">
<title>Összeadás</title>
<script>
  const numberList = [];
  function osszeadas(list) {    
	  const normalizeValue = (str, value, replace) => String(str).replace(value,replace);
  	const calc = (val1, val2) => {
    	const n1 = parseFloat(normalizeValue(val1, ',', '.'));
      const n2 = parseFloat(normalizeValue(val2, ',', '.'));
      return n2 ?
      parseFloat(normalizeValue(val1, ',', '.')) + 
    	parseFloat(normalizeValue(val2, ',', '.')) : 
      0; 
    }

    const osszeg_input = document.getElementById('osszeg');
    const ujszam_input = document.getElementById('ujszam');

    const calculated = calc(osszeg_input.value, ujszam_input.value);
    list.unshift(calculated);
    document.getElementById("numList").innerHTML = JSON.stringify(list, null, 2);
    osszeg_input.value = calculated ? normalizeValue(calculated, '.', ',') : osszeg_input.value;
    ujszam_input.value = '';
  }
	console.log(numberList);
</script>

</head>
<body>

<style>
  .container {
    padding: 20px;  
    display: flex;  
    flex-direction: row;
  }
  
  .col {
    flex-direction: column;
    margin: 0 10px
  }
  
  .custom-input-style input {
    height: 40px;
    font-size: 20px;
    margin: 10px 0;
  }

  .custom-input-style label {    
    font-size: 30px;
    font-weight: bold;
  }
</style>

<div class="container">
  <div class="col">
    <div class="custom-input-style">
      <label for='osszeg'>Összeg:</label>
      <input id='osszeg' disabled value='0'/>
    </div>

    <div class="custom-input-style">
      <label for='ujszam'>Hozzáadandó:</label>
      <input id='ujszam' type="text" pattern="-?[0-9]+([/.,][0-9]+)?">
    </div>

    <button onclick="osszeadas(numberList)">Összeadás</button> 
  </div>
  <div class="col">
    <pre id="numList"></pre>
  </div>
</div>

</body>
</html>