List of operators

Name

Description

Arithmetic Operators

These are the operators that operate upon the numerical values and return a numerical value.

Assignment Operators

assignment operator is equal (=) which assigns the value of the right-hand operand to its left-hand operand. That is if a = b assigns the value of b to a.

Comparison Operators

used to perform the logical operations that determine the equality or difference between the values

Logical Operators

used to make decisions based on conditions specified for the statements.

Ternary Operators

JavaScript shorthand conditional operator for simple if-else statements.

Bitwise Operators

performing bitwise operations on binary representations of numbers.

typeof Operator

returns the data type of its operand in the form of a string.

Example: Here are some basic examples of the above-mentioned operator.

Javascript
// Addition
let a = 5 + 3;
console.log(a);

// Subtraction
let b = 10 - 4;
console.log(b); 

// Addition Assignment
let y = 5;
y += 3;
console.log(y);

// Subtraction Assignment
let z = 15;
z -= 6;
console.log(z); 

Output
8
6
8
9

We have a complete list of JavaScript Operators, to check those, please go through this JavaScript Operators Reference article.



JavaScript Basics

JavaScript is a versatile, lightweight scripting language widely used in web development. It can be utilized for both client-side and server-side development, making it essential for modern web applications. Known as the scripting language for web pages, JavaScript supports variables, data types, operators, conditional statements, loops, functions, arrays, and objects. With JavaScript, you can create dynamic, interactive, and engaging websites.

These are the basics that you need to learn before deep dive into JavaScript:

Table of Content

  • Variables in JavaScript
  • Data type in JavaScript
  • Conditional statements in javascript
  • Function in Javascript
  • Looping in javascript
  • Comments in javascript
  • Operators in javascript

Similar Reads

1. Variables in JavaScript

JavaScript Variables are the building blocks of any programming language. In JavaScript, variables can be used to store reusable values....

List of variables:

Variables name Description Var oldest keywords to declare a variable and var can be updated and redeclared. let block-scoped, can’t be accessible out the particular block, and let can be updated but not redeclared const block scope, neither be updated nor redeclared....

2. Data types in JavaScript

Data type in JavaScript defines the type of data stored in a variable....

List of data types in javascript

Name Description Numbers Represent both integer and floating-point numbers. String A string is a sequence of characters. In JavaScript, strings can be enclosed within single or double quotes. Boolean Represent a logical entity and can have two values: true or false. Null This type has only one value: null. It is left intentionally so that it shows something that does not exist. Undefined A variable that has not been assigned a value is undefined. Symbol Unlike other primitive data types, it does not have any literal form. It is a built-in object whose constructor returns a symbol that is unique. bigint The bigint type represents the whole numbers that are larger than 253-1. To form a bigint literal number Object It is the most important data-type and forms the building blocks for modern JavaScript....

3. Conditional statements in javascript

Name Description if statement executing code based on a condition. else statement Alternative code execution when ‘if’ condition is not met. else if statement Additional condition check after ‘if’ and before ‘else’ statement. switch statement Multi-case conditional statement for executing code based on variable’s value....

4. Function in Javascript

A function in JavaScript is a block of reusable code that performs a specific task, can take inputs (parameters), and returns a result using the return statement....

5. Looping in javascript

Looping in programming languages is a feature that facilitates the execution of a set of instructions/functions repeatedly while some condition evaluates to true....

6. Comments in javascript

JavaScript comments are used to explain the code to make it more readable. It can be used to prevent the execution of a section of code if necessary....

7. Operators in javascript

JavaScript operators operate the operands, these are symbols that are used to manipulate a certain value or operand. Operators are used to performing specific mathematical and logical computations on operands....

List of operators

Name Description Arithmetic Operators These are the operators that operate upon the numerical values and return a numerical value. Assignment Operators assignment operator is equal (=) which assigns the value of the right-hand operand to its left-hand operand. That is if a = b assigns the value of b to a. Comparison Operators used to perform the logical operations that determine the equality or difference between the values Logical Operators used to make decisions based on conditions specified for the statements. Ternary Operators JavaScript shorthand conditional operator for simple if-else statements. Bitwise Operators performing bitwise operations on binary representations of numbers. typeof Operator returns the data type of its operand in the form of a string....

Contact Us