About 3,640,000 results
Open links in new tab
  1. javascript - Sum of two numbers with prompt - Stack Overflow

    Mar 28, 2014 · var a = prompt("Enter first number"); var b = prompt("Enter second number"); var x=parseInt(a); var y=parseInt(b); alert(x+y);

  2. JavaScript Program to Add Two Numbers

    const num1 = parseInt(prompt('Enter the first number ')); const num2 = parseInt(prompt('Enter the second number ')); Then, the sum of the numbers is computed. const sum = num1 + num2;

  3. JavaScript program to add two numbers - 3 different ways

    We can also read the numbers as user input and find out the sum as like below: const firstNumber = parseInt ( prompt ( "Enter the first number : " ) ) const secondNumber = parseInt ( prompt ( …

  4. JavaScript to find the sum of two numbers entered by the user

    In this program, you will learn how to find the sum of two numbers entered by the user in JavaScript. let x = prompt("Enter first number") let y = prompt("Enter second number") …

  5. Sum of two numbers in JavaScript - StackHowTo

    May 8, 2021 · I n this tutorial we will discover how to calculate the sum of two numbers entered by the user in Javascript. Program to calculate the sum of two numbers in JavaScript

  6. Addition of two numbers in JavaScript using functions - EyeHunts

    Feb 10, 2021 · Create a simple function with parameters and use the + operator to add two or more numbers in the JavaScript function. This code snippet is used to find the sum of two …

  7. JavaScript Program to Add Two Numbers - GeeksforGeeks

    May 8, 2024 · Adding two numbers using an arrow function in JavaScript involves creating a concise function syntax that adds parameters and returns the sum. Syntax: let addition = (a, b) …

  8. JavaScript Program For Addition of two numbers - Studytonight

    Dec 26, 2022 · Take 2 input variables. We can add two numbers in JavaScript by using the addition operator +. The Addition operator takes two operands and returns their sum. Enter the …

  9. javascript - How do I sum numbers using a prompt, like a …

    I tried to do a REALLY simple thing using JavaScript, a percentage calculator. This is the code: var num = prompt("What is the number?") var perc = prompt("What is the percentage of …

  10. JavaScript Program to Add Two Numbers - CodesCracker

    In this article, you will learn and get code for the addition of two numbers in JavaScript. The program is created in the following ways: Add two numbers using a form and a text box. …

  11. Some results have been removed
Refresh