10.07.2017 Views

javascript_tutorial

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Javascript<br />

<br />

<br />

JavaScript String sub() Method<br />

<br />

<br />

<br />

var str = new String("Hello world");<br />

alert(str.sub());<br />

<br />

<br />

<br />

Output<br />

Hello world<br />

sup ()<br />

This method causes a string to be displayed as a superscript, as if it were in a<br />

tag.<br />

Syntax<br />

Its syntax is as follows:<br />

string.sup()<br />

Return Value<br />

Returns the string with tag.<br />

Example<br />

Try the following example.<br />

175

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!