Skip to content

Instantly share code, notes, and snippets.

@wesbos
Created November 8, 2019 17:08
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save wesbos/1bb53baf84f6f58080548867290ac2b5 to your computer and use it in GitHub Desktop.
/* eslint-disable */
String.prototype.sarcastic = function() {
return [...this]
.map((char, i) => char[`to${i % 2 ? 'Upper' : 'Lower'}Case`]())
.join('');
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment