Category: JavaScript Tutorial

python tutorials and learn python

Created with Sketch.

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

JavaScript Logical Assignment Operators

JavaScript Logical Assignment Operators Summary: in this tutorial, you’ll learn about JavaScript logical assignment operators, including the logical OR assignment operator (||=), the logical AND assignment operator (&&=), and the nullish assignment operator (??=). ES2021 introduces three logical assignment operators including: Logical OR assignment operator (||=) Logical AND assignment operator (&&=) Nullish coalesing assignment operator…
Read more

An Introduction to JavaScript Logical Operators

An Introduction to JavaScript Logical Operators Summary: in this tutorial, you will learn how to use the JavaScript logical operators including the logical NOT operator( !), the logical AND operator ( &&) and the logical OR operator ( ||). The logical operators are important in JavaScript because they allow you to compare variables and do…
Read more

JavaScript Comparison Operators

JavaScript Comparison Operators Summary: in this tutorial, you will learn how to use JavaScript comparison operators to compare two values. Introduction to JavaScript comparison operators To compare two values, you use a comparison operator. The following table shows the comparison operators in JavaScript: Operator Meaning < less than > greater than <= less than or…
Read more

JavaScript Unary Operators Explained

JavaScript Unary Operators Explained Summary: in this tutorial, you will learn how to use JavaScript unary operators that take a single operand and performs an operation. Introduction to the JavaScript unary operators Unary operators work on one value. The following table shows the unary operators and their meanings: Unary Operators Name Meaning +x Unary Plus…
Read more

JavaScript Assignment Operators

JavaScript Assignment Operators Summary: in this tutorial, you will learn how to use JavaScript assignment operators to assign a value to a variable. Introduction to JavaScript assignment operators An assignment operator (=) assigns a value to a variable. The syntax of the assignment operator is as follows: let a = b; Code language: JavaScript (javascript)…
Read more

JavaScript Remainder Operator

JavaScript Remainder Operator Summary: in this tutorial, you’ll learn about the JavaScript remainder operator (%) to get the remainder of a number divided by another number. Introduction to the JavaScript remainder operator JavaScript uses the % to represent the remainder operator. The remainder operator returns the remainder left over when one value is divided by…
Read more

JavaScript Arithmetic Operators

JavaScript Arithmetic Operators Summary: in this tutorial, you will learn how to use JavaScript arithmetic operators to perform arithmetic calculations. Introduction to the JavaScript Arithmetic Operators JavaScript supports the following standard arithmetic operators: Operator Sign Addition + Subtraction – Multiplication * Division / An arithmetic operator accepts numerical values as operands and returns a single…
Read more

JavaScript Arrays

JavaScript Arrays Summary: in this tutorial, you’ll learn about JavaScript arrays and their basic operations. Introduction to JavaScript arrays In JavaScript, an array is an ordered list of values. Each value is called an element specified by an index. An JavaScript array has the following characteristics: First, an array can hold values of mixed types. For…
Read more