SUB - Subscript Of String in JavaScript

SUB Function makes the font into subscript, Subscript is very useful when writing chemical formulae or a Mathematical Problem.
<script type="text/javascript">
    var myString="2";
    document.write("H"+myString.sub()+"O");
    </script>

Note : Sub function can be applied to Strings only and it is not applicable on numbers.