Blogger Information
Blog 110
fans 0
comment 0
visits 112316
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
JavaScript语法测试,看看你能得多少分?
Coco
Original
297 people have browsed it

  经常需要做JS逆向的工作,必须要能看懂变态的JS语法,整理了5个题目外加一道附加题,看看你能得多少分?

  1、多个返回值用逗号分开,最终返回什么?

  function test1() { return 1, 2, 3; }

  document.write(test1());

  2、函数前面加返回值到底是什么?

  document.write(~function(){return 1;}());

  3、两个!!是什么意思?

  var a=0;

  document.write(!!(a=0));

  4、没有数字也能相加吗?

  document.write(+!![]+[]);

  如果说上面的的语法还算能接受的话,下面的语法就可以成为变态了。

  5、这个手游转让有点难度了

  document.write((!!1+[])[+[]]);

  附加题:终极一问

  var m=([]["filter"]["constructor"]("return this")()+[]);

  document.write((!![]+[])[+[]]+m[12]+(!![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+m[9]+(![]+[])[+!![]]+m[12]);

  评论达到100个时公布答案,想提前知道的可以私信我,发送“答案”,自动回复。

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post