Operators and Loops #

My reading notes for Code Fellows


Operators and Loops

*** Replit.com = allows you to run code in your browser. Repl.it is where you create an account. You’ll test code within the language you want to create.

*** CSS diner is another CSS learning game.

Assignment Operators:

An assignment operator assigns a value to its left operand based on the value of its right operand. The simple assignment operator is equal (=), which assigns the value of its right operand to its left operand.

Question: left and right shift operators? What does that look like?

Comparison Operators:

A comparison operator compares its operands and returns a logical value based on whether the comparison is true. The operands can be numerical, string, logical, or object values.

Expression:

An expression is any valid unit of code that resolves to a value. Primary Expresseions: Basic keywords ans general expressions in JavaScript.

Truth Tables:

A diagram in rows and columns showing how the truth or falsity of a proposition varies with that of its components.

&& :Compares two expressions and returns rue if they are all true || :Compares two expressions and returns true if at least one is true

These are Boolean values, either true or false.

Nesting Functions:

Loops: Loops offer a quick and easy way to do something repeatedly.

While (thisconditionEvasluatesToTrue){do this}

for (TheInitialValue; – thisconditionEvasluatesToTrue; increment;){do this}