I am all the time 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 one way or the other simply found some legacy String strategies that you simply 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 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 motive — they’ll break web sites! I am shocked I did not find out about these strategies earlier than as we speak. It is all the time enjoyable to see relics of the online previous although!