JavaScript Reference/Javascript Methods/sub
"sub()" Example
<source lang="javascript">
<html> <body> <button onclick="var myS = new String("Sample String");
document.write("regular string"+myS.sub());">
sub me </button> </body> </html>
</source>
"sub()" is applied to
<source lang="javascript">
+----------------+--------------------------------------------------------------+ | Applied_To |String | +----------------+--------------------------------------------------------------+
</source>
"sub()" Syntax, Parameters and Note
<source lang="javascript">
Note: Display a string as subscript text.
Syntax:
stringName.sub()
</source>