开发者

"reverse" in JavaScript [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 10 years ago.

From this cool post, one of the pieces of code is:

javascript:function flood(n) {if (self.moveBy) {for (i = 200; i >
0;i--){for (j = n; j > 0; j--) {self.moveBy(1,i);
self.moveBy(i,0);self.moveBy(0,-i); self.moveBy(-i,0); } }
}}flood(6);{ var inp = "D-X !msagro na dah tsuj resworb rouY"; var
outp = ""; for (i = 0; i <= inp.length; i++) {outp =inp.charAt (i)
+ outp ; } alert(outp) ;}; reverse

What is this reverse at the very end?

Edite开发者_如何学运维d Formatted Code From Above:

javascript:function flood(n) {
  if (self.moveBy) {
    for (i = 200; i >0;i--) {
      for (j = n; j > 0; j--) {
        self.moveBy(1,i);
        self.moveBy(i,0);
        self.moveBy(0,-i); 
        self.moveBy(-i,0); 
      }
    }
  }
}
flood(6); 
{
  var inp = "D-X !msagro na dah tsuj resworb rouY"; 
  var outp = ""; 
  for (i = 0; i <= inp.length; i++) {
    outp =inp.charAt (i) + outp ; 
  } 
  alert(outp);
}; 
reverse


It's not part of the javascript. It's a Reference Error most likely. Or in the context of the site, it's a typo.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜