Class 08
Thursday Afternoon June 29th 2023
Notes
- read (just Assignment and Comparison operators) Expressions and operators
- read (Loops and iteration)[https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Loops_and_iteration]
Q&A’s
Questions
- What is an expression in JavaScript?
- Why would we use a loop in our code?
- When does a for loop stop executing?
- How many times will a while loop execute?
Answers
- A piece of code that produces a value, such as a variable, a function call, or a mathematical operation.
- Use loops in code to repeat a set of instructions multiple times, saving time and reducing repetitive code.
- A for loop stops executing when the specified condition becomes false or when there are no more iterations left.
- A while loop will continue executing as long as the specified condition remains true, potentially running indefinitely if the condition is not met.