If I needed to implement this functionality using JavaScript:
......
if (!isNaN(num))
document.getElementById("isNum").innerHTML = num +" is a number";
......
Then in HTML :
<div>
<button onclick="checknum()">Enter any value : </button>
<p id="isNum"></p>
</div>
The expected output (for input "3"):
3 is a number
The query being posed is:
How can I highlight, perhaps via CSS, the variable within Javascript to display the output as follows:
3 is a number