Blog

python tutorials and learn python

Created with Sketch.

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

JavaScript Exponentiation Operator

JavaScript Exponentiation Operator Summary: in this tutorial, you will learn how to use the JavaScript exponentiation operator (**) to raise a number to the power of an exponent. Introduction to the JavaScript exponentiation operator To raise a number to the power of an exponent, you often use the static method Math.pow() with the following syntax:…
Read more

JavaScript Nullish Coalescing Operator

JavaScript Nullish Coalescing Operator Summary: in this tutorial, you’ll learn about the JavaScript nullish coalescing operator (??) that accepts two values and returns the second value if the first one is null or undefined. Introduction to the JavaScript nullish coalescing operator ES2020 introduced the nullish coalescing operator denoted by the double question marks (??). The…
Read more