<body>
<div class="container">
<input type="number" id="first">
<input type="number" id="second">
<button id="butId">Максимум</button>
<p id="out">
123
</p>
</div>
<script>
function min(a, b) {
console.log('1');
if (a>b) return b
else return a;
}
butId.addEventListener('click', function(e){
out.innerHTML=min(first,second);
})
</script>
</body>
it supposed to show in <p id='out'>
the minimal number of the two typed in. it shows
[object HTMLInputElement]
instead of a number and i do not see any errors