sup Method

Returns as string with HTML <SUP> tags placed around text in a String object.

function sup() : String

No checking is done to see if the tag has already been applied to the string.

The following example demonstrates how the sup method works.

var strVariable = "This is a string object";
strVariable = strVariable.sup();

The value of strVariable after the last statement is:

<SUP>This is a string object</SUP>

Community Additions