TypeScript - AndAlso

VB has an AndAlso, and an OrElse operator.

1
If (anObject is null) orelse (anObject.parent)

What will happen is if the first operation pans out, then it will not compute the second operation.

Typescript has this built in and it’s referred to as Short-circuit operators

1
2
Var a = 10
Var result = ( a<10 && a>5)

Since a=10, this operation will be false. It does not execute the second expression.

1
2
Var a=10
Var result = ( a>5 || a<10)

Since A is > 5 it does not execute the second operation.

Reference: