<!DOCTYPE html><html><head> <title>String to Number Conversion</title></head><body> <input type="text" id="numberInput" placeholder="Enter a number"> <button onclick="calculate()">Calculate</button> <p id="result"></p> <script> function calculate() { let input = document.getElementById("numberInput").value; let convertedNumber = Number(input); let result = convertedNumber + 10; document.getElementById("result").textContent = "Result: " + result; } </script></body></html>
let input = document.getElementById("numberInput").value ;let convertedNumber = parseInt(input) ;let result = convertedNumber + 10 ;document.getElementById("result").textContent = "Result: " + result ;