Created
November 8, 2019 17:08
-
-
Save wesbos/1bb53baf84f6f58080548867290ac2b5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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