You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var jscode = @"
function fun(item){
if (createmode == true) {
let a = 'a';
var b = 'b';
if(a && b != null ) {
let Maker = 'c';
let obj = {a:a,Closed:1,Closer:Maker,CloseDate:new Date()};
let rejust= null;
}
}
}
var createmode = true;
fun(null);
";
var s1 = Uglify.Js(jscode, new NUglify.JavaScript.CodeSettings() { }).Code;
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: