Qandeel Academylogo
  • Home
  • Articles
  • Questions
  • Free courses
  • About
  • Contact us
Login to Ask Question

category

  • PHP
  • HTML
  • MySql
  • Bootstrap
  • Array
  • JavaScript
  • CSS
  • jQuery
  • Nodejs
Qandeel Academy | Viewed 16 times | 2 weeks ago

how to return the sum of two numbers


I need a Javascript function that takes two numbers as arguments and returns their sum.

JavaScript
1 Answer
Mohammad Qandeel
Mohammad Qandeel
Answered 2 weeks ago
0

follow this code snippet

function sum(a,b){
	return a+b;
}
console.log(sum(1,2));
 

Facebook
Twitter
answer Link
Login or SignUp to add new answer

Related

  • How to substring in javascript
  • How to append HTML in javascript
  • How to create a function in javascript
  • How to declare global variable in javascript
  • How to pass array to function in javascript
  • How to declare array in javascript
  • How can I redirect the user from one page to another using JavaScript
  • How to use json in javascript

Recent

  • How I can Sort Numbers in Descending Order in JavaScript?
  • How I can Calculate the Mean in JavaScript?
  • How I can Sort Numbers in Ascending Order in JavaScript?
  • How I can Find the Largest Numbers in a Group of Arrays in JavaScript?
  • How I can Remove Every Vowel from a String in JavaScript?
  • How I can Move Capital Letters to the Front in JavaScript?
  • How I can remove Additional spaces from a sentence in JavaScript?
  • How to Find the Smallest and Biggest Numbers in JavaScript?
Copyright © Qandeel Academy 2019