Skip to content

Instantly share code, notes, and snippets.

@bignimbus
Last active August 29, 2015 14:07
Show Gist options
  • Save bignimbus/6eb8b32ce74304ae43a0 to your computer and use it in GitHub Desktop.
Save bignimbus/6eb8b32ce74304ae43a0 to your computer and use it in GitHub Desktop.
Turns a normal array of words into German industrial metal lyrics.
Array.prototype.rammstein = function () {
var phrase = '', rammsteined = [];
this.forEach( function ( word ) {
phrase += word.toUpperCase() + ' ';
rammsteined.push( phrase );
});
return rammsteined;
}
@bignimbus
Copy link
Author

var example = ['du', 'hast', 'mich'];
example.rammstein().forEach( function ( lyric ) {
  alert( lyric );
});

Alerts:

DU
DU HAST
DU HAST MICH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment