JavaScript

The “If” Statement

The “If” Statement

What If? The purpose of the “if” statement is to help control the flow of logic in a program. It can be used to execute one set of code in one situation and a different set of code in a different situation. I consider “if” to be the most basic control structure in programming.

Boolean Expressions

Boolean Expressions

A fair amount of computer programming is checking the condition of something and then doing one thing if that condition is right and another thing if that condition is wrong. We call that a Boolean operation. There are two options and one must be chosen.

JavaScript: Equality

JavaScript: Equality

Unlike most languages that I have encountered, JavaScript has a fairly tricky way of handling equality. It is possible in JavaScript for things that are clearly not the same to be equal. Just the same, things that seem the same can be not equal.

Basic Math Operators

Basic Math Operators

In computer science there are just a few universal operations, basic math operators seem to be one of them. The operators are as follows: Addition + Subtraction – Multiplication * Division / Parenthesis ()