How to add Superscript and Subscript in a String in JavaScript

How to add SuperScript and SubScript in a String in Javascript

How to add Superscript and Subscript in a String in JavaScript

 

In this Blog post i will demonstrate how to concatenate a Superscript or Subscript using HTML and Javascript


 

The Code




let supscript = '<sup> This is a SuperScript</sup>';

let subscript ='<sub> This is a Subscript</sub>';


let concatenateNow = "SuperScript :" + supscript + " ,SubScript : " + subscript ;



console.log(concatenateNow);



 

Check out  JavaScript IP Subnet Calculator Here 

Leave a Reply

Your email address will not be published. Required fields are marked *

18 − 9 =