New things in ECMAScript 2021: String.prototype.replaceAll()

This is going to be a pretty quick post (mainly because I am on vacation, next week).  I was skimming through what is new in ECMAScript 2021 and spotted replaceAll().  It is already supported in everything except for Internet Explorer.  Let’s take a look at a quick example. See the Pen String.prototype.replaceAll() Example by Joe …

Continue reading "New things in ECMAScript 2021: String.prototype.replaceAll()"

3 ways to concatenate strings with JavaScript

I genuinely thought that I had covered this topic already.  It appears that the closest that I came was “PHP: Fun with strings” (back in 2014), so let’s do it now? See the Pen String concatenation in JavaScript by Joe Steinbring (@steinbring) on CodePen. The three methods that I’m using about are concat(), “[string 1] …

Continue reading "3 ways to concatenate strings with JavaScript"