[Solved] How to write an if statement in Javascript?

[ad_1]

You could defer the evaluation by collecting the values of the call.

And then look with Array#some and Boolean as callback if some value is truthy.

if ([checkPassword(), checkUserName()].some(Boolean)) {
    // ...
}

0

[ad_2]

solved How to write an if statement in Javascript?