This topic is important to me because I want to start adding more functionality to my site and being able to work on automation.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Expressions_and_Operators
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Loops_and_iteration
A Comparison Operator compares its operands and returns a logical value based on whether the comparison is resulted as true.
Can be numerical, string, logical, or object values.
If two operands are not of the same type, JavaScript attempts to convert them.
The sole exception to type conversion is the === and !== operators.
These perform strict equality and inequality comparisons.
==: Equal, returns true if its equal. !=: Not equal, returns true if not equal. ===: Strict equal, returns true if equal and same type. !==: Strict not equal, Returns true if same type but not equal, or are of different types. >: Greater than, Returns true if left is greater than right. >=: Greater than or equal, Returns true if left is greater than or equal to right. <: Less than, Returns true if left is less than right. <=: Less than or equal, returns true if left is less than or equal to right.
A assignment operator assigns a value to its left operand based on the value of the right one. Ex. x = 50.
Assignment operators can be used with just the assignment sign (=) but can have all the operators of mathmatetics in front.
x= f() is a regular assignment
x += f() is an addition assignment, but it means x=x + f.
So for each assignment, the symbol would change for the math assignments.
Addition, Subtraction, Multiplication, Division, Remainder, Exponentiation, Left Shift, Right Shift, and more.
Loops offer a quick and easy way to do something over and over.
They essential repeat an action a number of times.
A For Loops repeats until a specfied condition evaluates to false.
One looks like this:
for (initialization; condition afterthought)
statement
It goes like this: Initialization is executed. Condition is evaluated, if its true the loop executes. The statement executes next, then the afterthoguth is executed. It then returns to the condition.
A while Loop statement executes its statements as long as a specified condition evalutes to true.
while (condition)
statement
If the condition becomes false, statement stops executing.
I want to learn how to execute Loops in JS. How do they work in the long term goals? How can I use these daily?