JavaScript sup () method
Definition and Usage
sup () method is used to display the string as superscript.
The method returns a string join the <sup> tag, as follows:
<Sup> string </ sup>
grammar
string.sup()
Browser Support
All major browsers support sup () method.
Examples
Examples
The text string displayed as standard:
<script>
var str = "Hello world!";
document.write(str.sup());
</script>
var str = "Hello world!";
document.write(str.sup());
</script>
try it"
JavaScript String Object