String.prototype.sup()

WycofywanyThis feature has been removed from the Web standards. Though some browsers may still support it, it is in the process of being dropped. Do not use it in old or new projects. Pages or Web apps using it may break at any time.

Przykłady

Przykład: Zastosowanie metody sub() i sup()

var superText="superscript";
var subText="subscript";
console.log("This is what a " + superText.sup() + " looks like.");
// This is what a <sup>superscript</sup> looks like
console.log("This is what a " + subText.sub() + " looks like.");
// This is what a <sub>subscript</sub> looks like.