javascript: (ä=#1={}&&alert)(ä)
Found this here http://sla.ckers.org/forum/read.php?2,15812,page=2
If you copy the title of the question and run it in the browser you should see that it's alerting the string representation of a funct开发者_如何学JAVAion.
function alert() {
[native code]
}
Could someone explain slowly what's going on?
Starting with what happens first and workout out from there
{} && alert—{}is true, soalertis evaluated and pushed left#1 = alert— assignalertto the variable#1(technically, you aren't allowed to use#to start an identifier, but some browsers apparently let you get away with it (dittoä))ä = #1— assign#1(alert) toää(ä)— callalertwithalertas an argumentalertautomatically callstheFirstArgument.toString()which turns the function into a string- You then get the rendered string
加载中,请稍侯......
精彩评论