#102·jsfuck

是否可以调用带有 2 个参数的函数?

作者: kamil-kielczewski创建于 2020年8月26日更新于 2020年8月27日
  1. Is it possible to call the function replace with 2 arguments - Like that: "truefalse"["replace"]("true","1") and write it in a similar way in JSF (without any kind of 'eval')? I have/see problem with the comma which separates the arguments... :(

  2. Is it possible to write in a similar way regular expression in the replace function argument e.g."truefalse"["replace"](/e/g,"E") (without any kind of 'eval') (we want to change e to E in the whole string)? (here I have/see problem with the slash I don't know how to "construct" them in JSF to be interpreted as regexp