- What is looping control flow allowing us to do?
Repeating pieces of code with different environment states - Describe what “loops” do in your own words.
Repeating pieces of code until the exit condition is met - What is the difference between while and do-loops?
While checks the exit condition before first execution, do-while executes one time the checks if it should repeat it’s code - What is indentation?
The spacing before each line of code
1. What is looping control flow allowing us to do?
Looping control flow allows us to go back to some point in the program where we were before and repeat it with our current program state.
2. Describe what “loops” do in your own words.
Execute a selected group of lines of code repeatedly for a specified number of times or when/while a certain condition is met.
3. What is the difference between while and do-loops?
A WHILE loop will execute while a certain condition is true. A DO loop will execute at least once and will continue to execute after the first iteration of the loop if and while a certain condition is true.
4. What is indentation?
Indentation inside blocks makes the structure of the code stand out. In code where new blocks are opened inside other blocks, it can become hard to see where one block ends and another begins. With proper indentation, the visual shape of a program corresponds to the shape of the blocks inside it.
Looping control flow allows us to go back to some point in the program where we were before and repeat it with our current program state.
Instead of writing things over and over again you can just put them into a loop to make things more practical
They differ only on one point: A do loop always executes its body at least once, and it starts testing whether it should stop only after that first execution.
Proper indentation helps recognizing blocks of code to read the code better so its easier to understand what it does
- A looping control flow is a block of code that will be ran through multiple times. The program will go back to some starting point and repeat.
- A loop will iterate through records or array. It may run completely through or it can break out of the iteration when a condition is met.
- A while loop will iterate through at least once and then checks the condition to continue after the first iteration.
- Indentation allows a block of code to be formatted for the purpose of making the code more readable. Specifically, when a block is added within the previous block, a tab or spaces are added.
Why does Ivan use “var” in his binding examples? The book and most on line say that generally “var” should not be used, and “let” or “const” are used instead…?
-
Looping control flow allows the program to go back to the start of a conditional execution with the current program state saved in the memory.
-
Loops repeat a process over and over until a certain condition has been met.
-
Do loops and while loops differ only in that do loops must execute at least once.
-
Indentation is the blank space before a line of code that offsets that line of code so it is easier to read.
Hello,
-
looping control flow allows us to repeat a routine until a wanted value is reached, and then we can proceed as per control flow (top to bottom).
-
You repeat a bit of code adding or subtracting to its value until the output is compatible with the rest of the code, or as per the desired function of the code.
-
a “while” loop might not even be run, if the considered value does not make it trigger. A “do” keyword will always perform the routine at least once.
-
Indentation has no function for the code, but allows the reader to follow with greater ease. The same goes with the comments, or writing values with all capitals except the first letter.
Best,
-
Looping control flow allows us to go back to repeat the process until we" break off" from the repetition after the final condition of the program is met.
-
Loops is used to do repetitive works like counting, adding, subtracting, multiplying, squaring, etc on a series of many numbers. It also can do anything that requires a repetition on the same function until a " limit counter" or a " final condition " are met and it will stop the loop.
-
The difference between " while" and " do " loops is that in the " do " loop, the " do" condition will have to be executed every time without fail. Then it will carry on to see whether the loop will stop.
-
In JavaScript, the codes are read from top to bottom. Developers can write codes in long lines and the codes will still be executed. However, for clarity and ease of understanding of another developer’s codes, indentation of the codes will allow more clarity and ease of understanding of the codes. It basically for clarity purposes as well as aesthetic making the codes more cleaner to read.
-
What is looping control flow allowing us to do?
looping control flow allows us to have the program go back to a certain point and repeat the process instructed, as long as it needs to be executed. -
Describe what “loops” do in your own words.
in my own words, loops allow the program to do whats instructed over and over without having to command it over and over again. -
What is the difference between while and do-loops?
while loops and do loops are different because while loops keep executing, and do loops executes once, and then tests whether it should be executed again. -
What is indentation?
indentation is the space before code to make it structured, and readable.
||
indentation is indenting code, initializing the loop, defining the binding and expression to check if loop must continue, and updating the state of the loop after each iteration.
- Looping control flow allows us to go back to some point in the program where
we were before and repeat it with our current program state. - They allow us to write a relatively short piece of code that executes commands however many times we need it to. Without them we would have to write a very similar piece of code multiple times.
- While checks a condition inside the brackets before the execution of statement. By using do loop the statement will definitely be executed at least once and only after that condition will be checked.
- The role of indentation inside blocks is to make the structure of the code stand out making the code easier to read.
-
What is looping control flow allowing us to do?
It allows us to have the program do the counting and keeping track of a value without having to write the code over and over. -
Describe what “loops” do in your own words.
Loops allow the program to run the code until a certain specified condition is met. -
What is the difference between while and do-loops?
While loops first check a condition, then execute the code if the condition is true. Do-loops always execute it’s code at least once. -
What is indentation?
Indentations make the structure of the code stand out and allow programmers to clearly differentiate one section from another.
- The looping control flow allows us to execute an action over and over under certain conditions
- Repeats a block of code and checks a condition
3.A while loop executes a statement or code block repeatedly as long as an expression is true
Do loop- the condition check happens at the end of the loop, will be executed at least once even if the condition is false - Indention is the structure of the code,
spaces to make code readable
What does looping control flow allow us to do (i.e. what do loops do)?
Loops allow a program to keep repeating (i.e. iterating) through a sequence of steps where the result of a later step can be used as an input for an earlier step during the next iteration of the loop. This process may continue until some pre-defined condition is met.
What is the difference between while and “do while” loops (aka “do loops”)?
- A while loop is the most common loop, and it first checks for a one or more conditions to be met before executing the following statement(s).
- On the other hand, a do while loop (aka “do loop”) executes the statement(s) at least once, and then begins checking for the conditions to be met in order to determine if the loop should be repeated (executed) again.
What is indentation?
Indentation is the addition of spaces in front of statements, typically done when the given statements act as blocks within a larger statement. This helps developers visually identify the individual blocks, making it easier to manage and modify the code.
1: Looping control flow allows us to go back to some point in the program where
we were before and repeat it with our current program state.
2: Loops allow us to let a program run over and over again until a wanted value is met, or to let it run to infinity, or let it run and stop when a value is met and still continue untill the next value etc, etc, etc…
3: while loop = the program loops until a value is met or loops infinite.
do loop = the program will run at least once, and decides on itself how many times the program has to run untill the wanted value is met.
4: Spaces and breaks between lines to let the code stand out. This is optional, you could write the code on 1 long line.
- Looping control flow allows us to determine the order in which conditions are evaluated.
- Loops allow us to repeat actions multiple times until the conditions are no longer true.
- While loops evaluate conditions first and do-loops run once then evaluate if further loops are required.
- Indentation makes sure the structure of the code stands out so that blocks of code are easily identifiable.
It allows to repeat a function until a condition is met.
Loops allows us to go back to the beginning of a function and execute it again.
A while loop will run continously until the condition is met. The do function will execute once even if false.
- What is looping control flow allowing us to do?
Looping control flow allows you to run a piece of code multiple times while going back to the current program state.
- Describe what “loops” do in your own words.
Loops essentially let’s take an equation, find the result, then take that answer and put it back into the original equation to get a new number, and so on.
- What is the difference between while and do-loops?
A do loop always executes its body at least once and starts testing whether it should stop only after first execution.
- What is indentation?
It is just a way to make code easier to read by adding spacing in certain areas.
-
Looping control flow allows for efficiency, to go back to a point of the program and repeat it.
-
Loops run a piece of code many times.
-
A while is a keyword that creates a loop. A do keyword loop executes the body at least once and tests whether it should stop after the first execution - it forces an answer before going forward.
-
An indentation is aesthetic and is used to make it easier for the code to standout.
- to go back to some point in the program where we were before
and repeat it with our current program state. - the ability to repeat an action until some termination condition exists.
- While some condition is True, a do loop always executes its body at least once,
it starts testing whether it should stop only after the first execution. - adding spaces in front of statements, to make the structure of the code stand out,
and easier to read.
-
Looping control flow allows us to go back to some point in the program where we were before and repeat it with our current program state.
-
Loops enable us to run a piece of code multiple times. It repeats the same statement until some conditions are met.
-
A “do-loop” only differs on one point - it always executes it’s body at least once.
-
Indenting code helps to keep structure and your code neatly organised. This is not required for the code to execute correctly, but it is good practice as it helps in identifying expressions and problem solving.