Open oljbo opened 1 month ago
The issue is its outputting
if(predicate)
let x = something
which is invalid.
As a workaround you can try,
1) use var
if possible, but beware scope hoisting
2) the above code doesnt really make sense anyway, youre declaring something but not using it. You can probably avoid this issue just by refactoring a bit
c# code is:
ths result is:
function fun(){if(createmode==!0){let t="a";var n="b";if(t&&n!=null)let n={a:t,Closed:1,Closer:"c",CloseDate:new Date}}}var createmode=!0;fun(null)
when I run the result in brower, It's has error: SyntaxError: Lexical declaration cannot appear in a single-statement context