Monday, September 26, 2022
HomeWeb 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 mentioned, I someway simply found some legacy String strategies that you simply in all probability should not use however have existed eternally. Let’s have a look!

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

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

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

  • An Interview with Eric Meyer

    Your early CSS books have been instrumental in pushing my love for entrance finish applied sciences. What was it about CSS that you simply fell in love with and drove you to put in writing about it? At first blush, it was the simplicity of it as in comparison with the table-and-spacer…

  • Create Namespaced Classes with MooTools

    MooTools has at all times gotten a little bit of grief for not inherently utilizing and standardizing namespaced-based JavaScript courses just like the Dojo Toolkit does.  Many builders create their courses as globals which is usually frowned up.  I principally disagree with that stance, however every to their very own.  In any occasion…

  • How to Create a Twitter Card
  • WordPress-Style Comment Controls Using MooTools or jQuery

    WordPress has a pleasant little impact on the Admin Dashboard the place it exhibits and hides the remark management hyperlinks once you mouseover and mouseout of the document’s container. Here is obtain that impact utilizing MooTools or jQuery. The XHTML Discover that we place the hyperlinks into…


RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments