Skip to content

Instantly share code, notes, and snippets.

@davidgilbertson
Created January 7, 2018 04:24
Show Gist options
  • Save davidgilbertson/82e55dc09812d459bfdbe5ce1dbddff4 to your computer and use it in GitHub Desktop.
Save davidgilbertson/82e55dc09812d459bfdbe5ce1dbddff4 to your computer and use it in GitHub Desktop.
const i = 'gfudi';
const k = s => s.split('').map(c => String.fromCharCode(c.charCodeAt() - 1)).join('');
self[k(i)](urlWithYourPreciousData);
@domvo
Copy link

domvo commented Feb 7, 2018

Could you explain the syntax regarding the [] after self/window?

@SeanSilke
Copy link

@domemvs it is transform gfudi to fetch by simple Caesar cipher.

@williamluisan
Copy link

williamluisan commented May 10, 2020

does anybody know a reference where I can read about self with [...] (self[...]) syntax?

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