0

I saw this neat comment on reddit.

https://www.reddit.com/r/ProgrammerHumor/comments/ak026v/aah_yes_c_my_favorite_soft_drink/ef1wi5c

The author makes clever use of javascript statements like:

!![]+[]          // 'true'
![]+[]           // 'false'
!![]+![]         // 1
[][!![]+![]]+[]  // 'undefined'

to generate strings from these named JS primitives, and the uses array access to build a string (reeeeeeeeee) from them.

I'd love to use this method to troll some friends, but I'd like some more letters.

true, false and undefined yield the letters "d" "n" "s" "f" "e" "a" "t" "i" "r" "l" "u" - is there a way to get other alpha chars? Specifically "p" and "o" but other chars would be cool too?

1
  • ... "a", "b", "c" etc. Please narrow your question, since it makes no sense. Do you mean you are limited in the set of input characters to ![]+? Commented Jan 27, 2019 at 9:15

1 Answer 1

1

"This is where you can find your answer."

This in obfuscation is -- (16441 chars)

[][([+!+[]+[!+[]+!+[]]]+(+[()())[!+[]+!+[]+!+[]+[+[]]]+(+(+!+[]+[+[]]+[+!+[]]))[(![+!+[]]+([+(+(+!+[]+[+[]]+[+!+[]]))[(![+!+[]]+(!+(![+!+[]+[!+[]+!+[]]])()

Refer the link here for more info

Full list of conversions

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.