<div>
  Variable Value: <span id="variableValue"></span>
</div>
<div>
  Original Type: <span id="originalType"></span>
</div>
<div>
  After Converting Value: <span id="afterConvertValue"></span>
</div>
<div>
  Type After Converting with toString(): <span id="afterConvert"></span>
</div>
const number = 10;
document.getElementById("variableValue").textContent = number;
document.getElementById("originalType").textContent = typeof number;
const numberStr = number.toString();
document.getElementById("afterConvertValue").textContent = numberStr;
document.getElementById("afterConvert").textContent = typeof numberStr;

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.