This site runs best with JavaScript enabled.

What's new in ES 2020?

November 18, 2019

As we near the end of the decade, Iโ€™d like to share with you some of the upcoming changes to JavaScript that are coming in 2020. These are all currently Stage 5 TC39 ECMASCript Proposals.


Sometimes you really need to explain something to the user. In ES2020, youโ€™ll be able to use the new .clap() function. This will both capitalize a string and inject the โ€œclapโ€ emoji (๐Ÿ‘) between spaces or the separator of your choice.

'21:9 should be called 7:3'.clap();
// => 21:9 ๐Ÿ‘ SHOULD ๐Ÿ‘ BE ๐Ÿ‘ CALLED ๐Ÿ‘ 7:3"
"Epstein didn't kill himself".clap();


// String.prototype.clap() Polyfill
if (!String.prototype.clap) {
Object.defineProperty(String.prototype, 'clap', {
value: function(separator, limit) {
return this.trim()
.split(separator || /\s/, limit)
.join(' ๐Ÿ‘ ');


This new utlity function can be chained to any Array prototype method to give it a short-lived performance boost. The one trade-off is that using .boomer() will use more and more of your userโ€™s CPU until the computer or device overheats and ultimately crashes. Use with caution.

new Array(10000).fill('_').map((_, index) => console.log(index));
// 100ms execution time
new Array(10000)
.map((_, index) => console.log(index))
// 50ms execution time

Unfortunately, no polyfill is available at the time of writing.


Another new string utility that will change a stringโ€™s casing by alternating between upper and lower. Really great for error messages and really anytime you want to make someone feel inferior to you.

'Use the platform'.sarcasm();
// => "uSe ThE pLaTfOrM"
'Gushers are actually just soup dumplings'.sarcasm();
// => "gUsHeRs aRe aCtUaLlY JuSt sOuP DuMpLiNgS"


// String.prototype.sarcasm() Polyfill
if (!String.prototype.sarcasm) {
Object.defineProperty(String.prototype, 'sarcasm', {
value: function(separator, limit) {
var upper = this.trim()
return this.trim()
.map((el, i) => (i % 2 == 0 ? el : upper[i]))

Share article

Hi! I'm Jared Palmer. I currently work on software build systems and developer experience at Vercel, which acquired my startup Turborepo in late 2021. Prior to that, I ran an independent software design and development agency called The Palmer Group in New York City.

PreviousReact is becoming a black boxNextGatsby vs. Next.js