Operators and Loops
What is an expression in JavaScript?
Expressions are valid unit of code that resolve an issue. There are two type:
- those that have side effects. There would be, for example, ‘=’ as this assigns a value.
- those that purely evaludate. This would be, for example, ‘+’ which
Why would we use a loop in our code?
Loops in the code would be used to initiate a sort of timer based on user input
When does a for loop stop executing?
Whenever the condition of becomes false.
How many times will a while loop execute?
It will execute as long as the condition is true, so how many times depends on the code.