Skip to content

Instantly share code, notes, and snippets.

@sters
Created November 24, 2013 10:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sters/7625466 to your computer and use it in GitHub Desktop.
Save sters/7625466 to your computer and use it in GitHub Desktop.
var target = "happybirthday";
var r=function(x,r){var s=String,a=Array,b=s.prototype.charCodeAt,c=b.call("a",0);return s.fromCharCode.apply(s,a.prototype.map.call(x,function(v){return c+((b.call(v,0)+r)%26);}))};
for(var i=0;i<26;i++) console.log(r(target, i));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment