Skip to content

Instantly share code, notes, and snippets.

@michaelgira23
Last active March 2, 2018 21:42
Show Gist options
  • Save michaelgira23/33e00301e4b2a1caca930181b52a5d99 to your computer and use it in GitHub Desktop.
Save michaelgira23/33e00301e4b2a1caca930181b52a5d99 to your computer and use it in GitHub Desktop.
JavaScript string "obfuscator." CAUTION: *This is only a joke! Do not actually use!*
const string = process.argv.slice(2).join(' ');
let output = '';
string.split('').forEach((value, index) => {
if (index !== 0) {
output += ' + ';
}
output += `String.fromCharCode(${value.charCodeAt(0)})`
});
console.log(output);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment