jsfuck
jsfuck copied to clipboard
Update README.md
More letters
There are many ways to get these letters. Why this particular way?
@hazzik This trick is non-trivial and allows to get RegExp without using any deprecated or semi-deprecated method (like escape
)
Function("return"+(NaN+""["matchAll"]("")).slice(10,17))()("pattern")
after partial expansion:
[]["flat"]["constructor"]("return"+[10]["concat"](17)["reduce"](""["slice"]["bind"]((NaN+""["matchAll"]("")))))()("pattern")
but may be better place will be "Alternatives" section (?)
@kamil-kielczewski use split(" ")
:
Function("return "+(NaN+("")["matchAll"]()).split(" ")[1])
Yep so we have
[]["flat"]["constructor"]("return "+([]+("")["matchAll"]())["split"](" ")[1])()("pattern")