function convertion() {
let inputValue = number(document.getElementById('firstValue').value);
let result = document.getElementById('secondValue');
result.innerHTML = inputValue * 10;
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width,initial-scale=1" />
</head>
<body>
<main>
<label for="firstValue">dm: </label>
<input id="firstValue" type='number'>
<button onclick="convertion()">
CONVERT
</button>
<br/>
<br/>
<label for="secondValue">cm: </label>
<input id="secondValue" readonly>
</main>
</body>
</html>
This is a dm-cm converter I don't know why it doesn't work. I think there's an error in the script.
I also don't know how to use the number function in this line:
let inputValue = number(document.getElementById('firstValue').value)