JustinEzequiel
Programmer
Greetings,
I know some JavaScript but this has me stumped.
I am translating some vendor-supplied code to another programming language and I do not know how an assignment statement can or cannot return a null.
I.e., is the snippet below checking if x is not null?
If not, then what is the condition checking?
Thanks
I know some JavaScript but this has me stumped.
I am translating some vendor-supplied code to another programming language and I do not know how an assignment statement can or cannot return a null.
I.e., is the snippet below checking if x is not null?
If not, then what is the condition checking?
Code:
var x;
if ((x = SomeObj.MethodThatReturnsALong(42)) != null)
{
// more code here
}
Thanks