About

Friday, January 20, 2023

#26 While/do while loop | JavaScript Full Tutorial


 

In this lesson let's learn all about the while/do while loops. The while loops works in a similar way to the for loop in that it loops over a block of code. the difference is the initialiser variable is written before and outside of the while loop syntax, and the final expression is included inside the while loop curly braces after the code to be run. Only the condition is included inside the parentheses of a while loop. We'll also learn about the do while loop, the do while loop will run the code at least once before coming on to evaluating the condition.

#25 How to use the JS For Loop | JavaScript Full Tutorial


 

In this lesson let's learn all JS Loops by starting with the for loop. The for loop is the most common type of loop in JavaScript. Let's learn how to use a for loop to loop through a list of values and do something with them, for e.g. using the values with some custom text. By the end of this lesson you will be comfortable and able to start using for loops in your projects.

#24 The Ternary (Conditional) Operator | JavaScript Full Tutorial


 The word ternary means composed of three parts, and thats because the Ternary Operator consists of three operands. In this lesson we're going to learn how to write the Ternary Operator and how it works.

#23 How to use the Switch Statement | JavaScript Full Tutorial


 

In this lesson let's learn all about the Switch statement, the Switch statement takes a single value, and then looks through a list of choices (called cases), until a case that matches the value is found. Each case has it's own corresponding code that will be executed if there is a match.

#22 If else Statements | JavaScript Full Tutorial


 In this lesson we're going to be learning all about the most commonly used Conditional Statement, the if statement. The if statement takes a condition and evaluates whether it is a truthy or falsy value, if it's true then it will run a block of code. We also learn about the variants, if else and else if statements.


#21 What is JS Control flow? | JavaScript Full Tutorial


 

In this lesson let's learn all about JS Control Flow. By default our JavaScript code is executed from top to bottom, line by line however we can change this with control flow. Control flow allows our program to make decisions about what code is executed and when. This is where JavaScript really starts to come alive, Javascript contains certain conditional statements and loops that enable us to control the flow of our code, making our projects and applications more powerful, dynamic and interactive.

Twitter Delicious Facebook Digg Stumbleupon Favorites More