Skip to content

Instantly share code, notes, and snippets.

@sgb-io
Created August 8, 2017 09:42
Show Gist options
  • Select an option

  • Save sgb-io/18c2c0388256e6a564c55fdf59c98737 to your computer and use it in GitHub Desktop.

Select an option

Save sgb-io/18c2c0388256e6a564c55fdf59c98737 to your computer and use it in GitHub Desktop.
// Combine these to write sentences!
(+!+[]) // 1 - use it to pick an index from any of the strings in this list
(-(+!+[])+(+!+[])) // 0
([![]]+[][[]]) // "falseundefined", you can then pick a character via index by adding 1s
(![]+[]) // "false"
(!+[]+[]) // "true"
// JavaScript return types we are exploiting:
// false, true, undefined, 0, 1
// TODO - can we get any others by just using operators?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment