r/programming • • Aug 10 '12

Write any javascript code with just these characters: ()[]{}+!

http://patriciopalladino.com/blog/2012/08/09/non-alphanumeric-javascript.html
1.3k Upvotes

288 comments sorted by

View all comments

Show parent comments

3

u/hapemask Aug 10 '12

The string constructor's name is "String" not "string".

If you're referring to the fact that Integer.toString() cant give uppercase, all you need is "p", and then you can use the unescape trick described in the blog.

1

u/lachlanhunt Aug 10 '12

The string constructor's name is "String" not "string".

What? Where did I say the constructor's name was "string"?

Good point about the unescape trick. I forgot that the p from this would allow that to be called, which means you can then get String.fromCharCode(), giving you any 16 bit Unicode code unit.