Javascript Legacy string methods for generating HTML

These legacy string methods take a basic string of text and wrap it in a HTML tag of the same name

        
"Person".big()       // Output: "<big>Person</big>"
"Person".blink()     // Output: "<blink>Person</blink>"
"Person".bold()      // Output: "<b>Person</b>"
"Person".italics()   // Output: "<i>Person</i>"
"Person".link("https://google.com")  // Output:  "<a href="https://google.com">Person</a>"        
    
Posted in

Ankit Patel

Leave a Comment

Your email address will not be published.

Scroll to Top