Can you use && inside a conditional as one execution? (UnityScript)

For example:

if(this){
    somecode;
    somemorecode;
    if(otherThing) thisBoolean = true && otherBoolean = true;
}

Does the same apply for C#? I know I could simply just let them have their own execution, but I think if only a few executions depend on something, then, why not make it a bit neater if possible.

Any single expression will work as the block following a conditional.

BUT I’d recommend ALWAYS using braces where a block is expected. I’ve lost several hours over the years because I’d carelessly add another item to what I thought was an “if” block and have it always evaluate.

if(otherThing) thisBoolean = true && otherBoolean = true;

That’s not valid syntax or logic and won’t compile. Use this:

if (otherThing) {
    thisBoolean = true;
    otherBoolean = true;
}

Or this:

if (otherThing) {
    thisBoolean = otherBoolean = true;
}