Example inputs that cause the problem
if (true) {
const n = 42;
}
is obfuscated into
if (true) {
} else {
let n = 42;
}
is obfuscated into
if(!![]){}else let n=0x2a;
When if or else clause contains only one statement, { and } are omitted in the obfuscated code and this makes a problematic sequence of words like if const <statement> or else let <statement>.
Steps to Reproduce
- Access https://obfuscator.io/ and leave all the options default.
- Obfuscate examples above.
- Input the obfuscated code into Chrome console and see the result.
Your Environment
Chrome 83.0.4103.116 (Official Build) (64 bit) (cohort: Stable)