Category: JavaScript Tutorial

python tutorials and learn python

Created with Sketch.

JavaScript continue

JavaScript continue Summary: in this tutorial, you will learn how to use the JavaScript continue statement to skip the current iteration of a loop. Introduction to the JavaScript continue statement The continue statement terminates the execution of the statement in the current iteration of a loop and immediately continues to the next iteration. Here’s the…
Read more

JavaScript break

JavaScript break Summary: in this tutorial, you’ll learn how to use the JavaScript break statement to terminate a loop prematurely. The label statement In JavaScript, you can label a statement for later use. Here’s the syntax of the label statement: label: statement; Code language: HTTP (http) In this syntax, the label can be any valid identifier.…
Read more

JavaScript for Loop

JavaScript for Loop Summary: in this tutorial, you will learn how to use the JavaScript for loop statement to create a loop with various options. Introduction to the JavaScript for loop statement The for loop statement creates a loop with three optional expressions. The following illustrates the syntax of the for loop statement:   for…
Read more

JavaScript do…while Loop

JavaScript do…while Loop Summary: in this tutorial, you will learn how to use the JavaScript do…while statement to create a loop that executes a block until a condition is false. Introduction to the JavaScript do…while statement The do…while loop statement creates a loop that executes a block until a condition evaluates to false. The following statement…
Read more

JavaScript while Loop

JavaScript while Loop Summary: in this tutorial, you will learn how to use the JavaScript while statement to create a loop that executes a block as long as a condition is true . Introduction to the JavaScript while loop statement The JavaScript while statement creates a loop that executes a block as long as a…
Read more

JavaScript switch case

JavaScript switch case Summary: in this tutorial, you will learn how to use the JavaScript switch statement to execute a block based on multiple conditions. Introduction to the JavaScript switch case statement The switch statement evaluates an expression, compares its result with case values, and executes the statement associated with the matching case value. The…
Read more

JavaScript Ternary Operator

JavaScript Ternary Operator Summary: in this tutorial, you will learn how to use the JavaScript ternary operator to make your code more concise.  Introduction to JavaScript ternary operator When you want to execute a block if a condition evaluates to true, you often use an if…else statement. For example: let age = 18; let message;if…
Read more

JavaScript if else if

JavaScript if else if Summary: In this tutorial, you will learn how to use the JavaScript if…else…if statement to check multiple conditions and execute the corresponding block if a condition is true. Introduction to the JavaScript if else if statement The if an if…else statements accept a single condition and execute the if or else…
Read more

JavaScript if else

JavaScript if else Summary: in this tutorial, you will learn how to use the JavaScript if…else statement to execute a block based on a condition. Introduction to the JavaScript if…else statement The if statement executes a block if a condition is true. When the condition is false, it does nothing. But if you want to…
Read more

JavaScript if

JavaScript if Summary: in this tutorial, you will learn how to use the JavaScript if statement to execute a block when a condition is true. Introduction to the JavaScript if statement The if statement executes block if a condition is true. The following shows the syntax of the if statement: if( condition ) statement; Code…
Read more