Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
aston
on Feb 26, 2010
|
parent
|
context
|
favorite
| on:
Get any a-Z char using only []()+{}/. in JavaScrip...
Here's the breakdown:
[]["sort"]["call"]()["eval"]
is the same in javascript as
([].sort.call()).eval
The part in parentheses calls Array.sort with an undefined
this
object, defaulting it to
window
. Array.sort returns
this
after it's done. Global functions like
eval
are stored on
window
, so you end up with
window.eval
.
lisper
on Feb 26, 2010
[–]
Ah. Thanks!
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: