Oscail naisc i dtáb nua
    • Tuairisc Oibre
    • Ríomhphost
    • Athscríobh
    • Caint
    • Gineadóir Teidil
    • Freagra Cliste
    • Dán
    • Aiste
    • Scéal grinn
    • Postáil Instagram
    • Postáil X
    • Postáil Facebook
    • Scéal
    • Litir chlúdaigh
    • Atosaigh
    • Tuairisc den Jab
    • Litir Mholta
    • Litir éirí as
    • Litir Chuireadh
    • Teachtaireacht bheannaithe
    • Bain triail as tuilleadh teimpléad
  1. JavaScript provides a variety of arithmetic operators that perform mathematical operations on numbers. These operators can be used with literals, variables, or expressions.

    Basic Arithmetic Operators

    • Addition (+): Adds two numbers or concatenates two strings.

    let x = 5 + 2; // 7
    let y = "Hello" + " World"; // "Hello World"
    Cóipeáilte!
    • Subtraction (-): Subtracts the second number from the first.

    let x = 5 - 2; // 3
    Cóipeáilte!
    • Multiplication (*): Multiplies two numbers.

    let x = 5 * 2; // 10
    Cóipeáilte!
    • Division (/): Divides the first number by the second.

    let x = 5 / 2; // 2.5
    Cóipeáilte!
    • Modulus (%): Returns the remainder of the division of two numbers.

    let x = 5 % 2; // 1
    Cóipeáilte!
    • Exponentiation ()**: Raises the first number to the power of the second.

    let x = 5 ** 2; // 25
    Cóipeáilte!

    Increment and Decrement Operators

    • Increment (++): Increases a number by one.

    let x = 5;
    x++; // 6
    Cóipeáilte!
    • Decrement (--): Decreases a number by one.

    let x = 5;
    x--; // 4
    Cóipeáilte!

    Unary Operators

    • Unary Plus (+): Converts a non-number to a number.

    let x = +"3"; // 3
    Cóipeáilte!
    Aiseolas
    Go raibh maith agat!Inis tuilleadh dúinn
  2. JavaScript Arithmetic - W3Schools

    The numbers (in an arithmetic operation) are called operands. The operation (to be performed between the two operands) is defined by an operator.
    Arithmetic Operations

    A typical arithmetic operation operates on two numbers. The two numbers can be literals: or variables: or expressions:

    Exponentiation

    The exponentiation operator (**) raises the first operand to the power of the second operand. x ** y produces the same result as Math.pow(x,y):

  3. JavaScript Arithmetic Operators - GeeksforGeeks

    11 DFómh 2025 · The multiplication operator gives the product of operands where one operand is a multiplicand and another is multiplier. The division operator provides the quotient of its operands …

  4. Iarrann daoine freisin
  5. Basic math in JavaScript — numbers and operators - MDN Web Docs

    18 Lún 2025 · At this point in the course, we discuss math in JavaScript — how we can use operators and other features to successfully manipulate numbers to do our bidding.

  6. JavaScript Arithmetic Operators - Tutorial Gateway

    The JavaScript Arithmetic Operators include operators like Addition, Subtraction, Multiplication, Division, and Modulus. All these operators are binary operators, …

  7. JavaScript arithmetic operators - w3resource

    19 Lún 2022 · In JavaScript, arithmetic operators take numerical values (either literals or variables) as their operands and return a single numerical value. There are four standard arithmetic operators, …

  8. Arithmetic - HTML - OneCompiler

    Write, Run & Share HTML code online using OneCompiler's HTML online Code editor for free. It's one of the robust, feature-rich online Code editor for HTML language, running on HTML5. Getting started …

  9. JavaScript Operators (with Examples) - Programiz

    JavaScript operators are special symbols that perform operations on one or more operands (values). For example, Here, we used the + operator to add the operands 2 and 3. Here is a list of different …

  10. JavaScript Arithmetic Operators: A Complete Tutorial …

    5 DFómh 2024 · These operators are crucial for various calculations in JavaScript programming. Here’s a breakdown of each arithmetic operator with multiple …

  11. JavaScript Arithmetic Operations - Lesson 5 | JavaScript …

    29 Meith 2025 · JavaScript provides a comprehensive set of arithmetic operators that allow you to perform mathematical operations. These operators work with …

  12. JavaScript Arithmetic Operators

    JavaScript supports the following standard arithmetic operators: An arithmetic operator accepts numerical values as operands and returns a single numerical value. The numerical values can be …