Browse Source

Merge pull request #87 from hazzik/Object-follow-up

Optimize U
Martin Kleppe 5 years ago
parent
commit
22fcb21580
2 changed files with 2 additions and 2 deletions
  1. 1 1
      jsfuck.js
  2. 1 1
      output.txt

+ 1 - 1
jsfuck.js

@@ -72,7 +72,7 @@
     'R':   '(+[]+RegExp)[10]',
     'R':   '(+[]+RegExp)[10]',
     'S':   '(+[]+String)[10]',
     'S':   '(+[]+String)[10]',
     'T':   '(NaN+Function("return Date")()())[30]',
     'T':   '(NaN+Function("return Date")()())[30]',
-    'U':   '(NaN+Function("return{}")()["to"+String["name"]]["call"]())[11]',
+    'U':   '(NaN+Object()["to"+String["name"]]["call"]())[11]',
     'V':   USE_CHAR_CODE,
     'V':   USE_CHAR_CODE,
     'W':   USE_CHAR_CODE,
     'W':   USE_CHAR_CODE,
     'X':   USE_CHAR_CODE,
     'X':   USE_CHAR_CODE,

+ 1 - 1
output.txt

@@ -51,7 +51,7 @@
 `R` 1860
 `R` 1860
 `S` 578
 `S` 578
 `T` 3854
 `T` 3854
-`U` 2834
+`U` 2227
 `V` 5096
 `V` 5096
 `W` 5101
 `W` 5101
 `X` 5106
 `X` 5106