Sunday, November 17, 2024
HomeSoftware DevelopmentLegacy String Strategies for Producing HTML

Legacy String Strategies for Producing HTML


I am at all times actually excited to see new strategies on JavaScript primitives. These additions are acknowledgement that the language must evolve and that we’re doing thrilling new issues. That being stated, I one way or the other simply found some legacy String strategies that you just most likely should not use however have existed perpetually. Let’s have a look!

These legacy string strategies take a primary string of textual content and wrap it in a HTML tag of the identical identify:

"Howdy".massive() // "<massive>Howdy</massive>"
"Howdy".blink() // "<blink>Howdy</blink>"
"Howdy".daring() // "<b>Howdy</b>"
"Howdy".italics() // "<i>Howdy</i>"
"Howdy".hyperlink("https://davidwalsh.identify") // "<a href="https://davidwalsh.identify">Howdy</a>"

Native prototypes do not normally take away strategies and for good cause — they’ll break web sites! I am shocked I did not learn about these strategies earlier than at the moment. It is at all times enjoyable to see relics of the net previous although!

  • JavaScript Promise API

    Whereas synchronous code is simpler to comply with and debug, async is mostly higher for efficiency and suppleness. Why “maintain up the present” when you may set off quite a few requests without delay after which deal with them when every is prepared?  Guarantees are changing into a giant a part of the JavaScript world…

  • 5 Awesome New Mozilla Technologies You&#8217;ve Never Heard Of

    My journey to Mozilla Summit 2013 was unimaginable.  I’ve spent a lot time specializing in my undertaking that I had overlooked all the nice work Mozillians had been placing out.  MozSummit offered the right reminder of how good my colleagues are and the way a lot…

  • Create a Simple Slideshow Using MooTools

    One glorious means so as to add dynamism to any web site is to implement a slideshow that includes photographs or sliding content material. In fact there are quite a few slideshow plugins out there however a lot of them might be overkill if you wish to do easy slideshow with out controls or occasions.

  • JavaScript Canvas Image Conversion

    Ultimately week’s Mozilla WebDev Offsite, all of us spent half of the final day hacking on our future Mozilla Market app. One cellular app that lately acquired numerous consideration was Instagram, which offered to Fb for the bat shit loopy worth of 1…



Supply hyperlink
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments