The sub() method displays a string as subscript text.
The sub() method displays a string as subscript text.
This method returns the string embedded in the <sub> tag, like this:
<sub>string</sub>
string.sub()
None
A string embedded in the <sub> tag
Display a string as subscript text:
//display a string as subscript text. var str = "Hello World!"; var result = str.sub(); console.log(result);/*ww w .j a va 2s . c om*/