- Looping control flow allows us to execute the same piece of code multiple times.
- Loops execute a statement while a certain condition is met.
- A while loop evaluates a condition before running, while a do loop executes once before evaluating a condition to determine whether it should carry on.
- Indentation lays out the structure of the code and makes it more readable.
-
What is looping control flow allowing us to do?
Allows us to repeat statements and command blocks -
Describe what âloopsâ do in your own words.
Loops execute blocks of code multiple times until stipulated conditions or values are met -
What is the difference between while and do-loops?
do loops execute the code at least once before checking conditions while while loops check conditions before executing -
What is indentation?
Indentation is like âparagraphingâ and âspacingâ, allowing you to better organize your code and make it easier to be read.
- Looping controls flow by allowing us to repeat a script over and over again without having to re-write the script for each repetition when the script contains more than one statement. Controlling the flow of the script is necessary because of the way statements are executed from top to bottom.
- A loop is defined as something that winds, curves or encircles. In JavaScript the loop is not visible as a loop. Instead it is a statement of code that loops around and around. It is within the syntax of the code that the loop is structured and directed to control the flow.
- The while loop in the code points to a duration of an expression. That is, how long will the loop continue. The Boolean expressionâs value dictates the extent of the loop when the expression is no longer true.
The do loop is usually used with the while loop and is considered a control flow statement. It differs from the while loop in that it must execute its requirement at least once before the code can continue. There is something that must be done before the loop can continue. The while loop has no such requirement and that is how the two loops differ. - Indentation has to do with how the written code is structured. It has little to do with how the computer reads code. In essence it makes the code more readable for yourself and for others. Sometimes code editing programs will help with the indentation. What is important is that there is consistency in the structure to identify the placing of the code blocks.
- A way to run a piece of code multiple
times. This form of control flow is called a loop. - a do while loop is a control flow statement that executes a block of code at least once, and then repeatedly executes the block, or not, depending on a given boolean condition at the end of the block. (thanks to google and Wikipedia
) ⌠o yeah and Ivan who tells us to use Google
- The most important difference between While and Do-While is that in Do-While, the block of code is executed at least once.
i.e., the Do-While loop runs at least once, even though the condition given is false
While- your condition is at the begin of the loop block, and makes possible to never enter the loop.
In While loop, the condition is first tested and then the block of code is executed if the test result is true.
4. Indentation is the space between blockes of code wich make it more readable.
Just one question Ivan.
I watched your video about Loops in Javascript.
Why the he⌠would we want to use Loops in a website? Can you find one website where a sentence is repeated a hundred times⌠or 3, 5 or whatever.
Loops in Exel i would understand but on a website⌠please explane.
Greetings from The Netherlands⌠bye the way⌠i love your shows at 8:00 AM.
Number one use for loops on Webpages is when you retrieve a list of data from your server and want to display it as rows in an element on the page. But there are plenty of others as well.
What is looping control flow allowing us to do?
It allows us to break the normal control flow top to bottom and move back to repeat steps already completed.
Describe what âloopsâ do in your own words.
Loops allow repetitive code to be repeated over and over while being updated by updated bindings within the loop.
What is the difference between while and do-loops?
They are similar except that the do-loop will always complete the loop at least once, before testing for a break situation.
What is indentation?
Indentation is used to make you program more readable by using tabs or spaces, allowing you to easily see the start and ending of blocks.
-
What is looping control flow allowing us to do?
Just like it sounds, it allows us to loop a code, which is running a code multiple times. -
Describe what âloopsâ do in your own words.
Looping is basically running a code multiple times until a certain requirement is met. Depending on the code, you can make the program do various things, or do nothing at all, until a requirement is met. -
What is the difference between while and do-loops?
The difference is that a while loop wont execute if a requirement is not met, while do-while will execute atleast once before checking the condition. -
What is indentation?
Its a way to keep the code more structured and readable and make it stand out.
-
Looping control flow allows us repeat a set of code with updated information.
-
Loops are pieces of code that are executed multiple times over and over until a certain criteria is met
-
With do loops, the code is executed first then the expression is checked, with while loops, the expression is checked then only is the code executed.
-
It is a way to visually structure code so you can clearly see the flow in which the code will be executed.
- A looping control flow makes it possible to repeat a piece of code with a new value .
- A loop is a repetition of an event (or a set of events) with a new value until the desired result is achieved.
- A while loop will go on until it reaches the desired result. A do loop will run at least once before it starts testing its condition (so before it essentially becomes a while loop).
- A means to structure your code visuallyâŚ
Quite helpful, thanks
- Looping control flow allows us to go back to a point in the program and repeat it with a different value.
- A loop is a tool allowing us to run a code (or a piece of code) multiple times.
- A âdoâ loop always needs to execute at least once.
- Spacing the statements accordingly in order to get the code more organised, making it easier to check upon it.
-
What is looping control flow allowing us to do?
I found âTHEâ best definition for this in which helps me understand the overall process of looping control flow. To me, itâs almost like a process/decision flow :
a. Sequencing â do this THEN this THEN thisâŚ
b. The Selection â if, unless, switch, case, âŚ
c. Iteration â for, while, repeat, until, âŚ
d. Procedural Abstraction subroutine call
e. Recursion â meaning that a function calls itself as a subroutine and allows the function to be repeated several times. I personally had an issue with this since I accidentally programmed an infinite loop which crashed my browser.
f. Nondormancy â do this OR this ORâŚthat is, choose one
g. Concurrency â do multiple things at the same time. -
Describe what âloopsâ do in your own words.
Loops are used for running the same code over and over again. -
What is the difference between while and do-loops?
a. While Loops â is a control flow statement that allows code to be executed repeatedly based on a given Boolean condition. The while loop can be thought of as a repeating statement.
b. Do-Loops â while the do loop is also a part of the control flow statement, it executes code at least once, and then repeatedly the block, or not, depending on the given Boolean condition at the end of the block. -
What is indentation?
For Javascript coding, indentation is technically not needed, but it does helps a structured/organized way of reading the code. This is important since in most cases the programmer is working with a team on a project. You will want others to read and make sense of your codeâŚin short, easy to understand.
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 allows us to run a piece of code multiple times.
3. The difference between a while and do-loop is that a do loop always executes its body at least once, and it starts testing whether it should stop only after the first execution.
4. Indentation allows the structure of the code to stand out.
-
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. -
Describe what âloopsâ do in your own words.
loops gives us the ability to run a line of code multiple times until certain criteria are met. -
What is the difference between while and do-loops?
do loop always executes its body at least once and begins to test whether it should stop only after the first execution. -
What is indentation?
Indentations allow us to structure blocks of code to make it stand out, this makes it is easier for the programmer to determine when one block ends and another begins.
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.
The loop keeps executing some code until its value is not true
3. What is the difference between while and do-loops?
A do loop is a control structure similar to a while loop. It differs 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
4. What is indentation?
Adding spaces in front of statements that are part of some larger statement.
- Looping control flow is the ability to return to some point in the program and repeat it with the current program state.
- Loops give the ability to repeat a command without rewriting code over and over againâŚsaving time, finger energy and loopiness of the brain.
- A while loop creates the loop.A do loop is similar to while, except it always executes itâs body at least once and starts testing whether it should stop only after the first execution.
- Indentation is a spacing practice used to make code reading more organized and easier to read (making the structure of code more clear). Some writers can use four or fives spaces for the next line of code, while others may use the Tab button.
What is looping control flow allowing us to do?
_looping control flow allows us to to go back to some point in the program where we were before and repeat it with our current program state. _
Describe what âloopsâ do in your own words.
loops read and execute the program line by line and then go back to the start if a certain criteria has not been reached. EG a variable does not equal to a certain value yet. then the program starts again until it gets to that value
What is the difference between while and do-loops?
a do loop always executes its body at least once, and it starts testing whether it should stop only after the first execution
What is indentation?
these are the spaces that you leave between brackets and inside blocks. They allow you to read the code more easily
What is looping control flow allow 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.
Describe what â loopsâ do in your own words.
A loop is a function that continues to revisit the original statement and execute it as long as the boolean value is still true.
What is the difference between while and do-loops?
A while loop continues to execute the statement as long as the boolean value is true and a do loop is a function that executes first and then checks if the statement is true.
What is indentation?
The role of indention is for visual organization and to make certain code stand out.
- it is allowing us to repeat the control flow for a specified set of commands until a certain condition is met in order to stop the loop. It also allows us to write simpler code that repeats itself and that can be altered in just one place, in contrast to copying and pasting the same command over and over again and having to alter it on every single instance it was used.
- loops are repetition functions that keep performing a certain set of commands until a condition is achieved to stop the loop and resume the program
- A do loop is a control structure similar to a while loop. It differs 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. To reflect this, the test
appears after the body of the loop. - indentation is the spaces used before a line of code to visually assist the coder and show the hierarchy of the program, allowing one to easily know what block of data is inside another block of data.