Arithmetic operations in TypeScript are simple and bear a strong resemblance to those in basic mathematics. We use + for addition, - for subtraction, * for multiplication, / for division, % for determining the remainder of a division, and ** for exponentiation.
As showcased in the example above, operators are inserted between two numbers to perform the calculations.
While arithmetic operations focus on numeric computations, logical operations deal with conditions. They yield a boolean value: true or false. TypeScript uses AND (&&), OR (||), and NOT (!) to perform logical operations.
In this instance, we used the actual boolean values — true and false — to illustrate the fundamental functioning of logical operators. However, in real coding scenarios, these true and false values would likely be expressions, such as (b > 5) && (b < 8).
