answersLogoWhite

0


Best Answer

This function will accept two parameters and return the difference between the first and second parameter.

function diffBetween ( a, b ) {

return a-b;

} //end diffBetween

User Avatar

Wiki User

12y ago

Still curious? Ask our experts.

Chat with our AI personalities

FranFran
I've made my fair share of mistakes, and if I can help you avoid a few, I'd sure like to try.
Chat with Fran
EzraEzra
Faith is not about having all the answers, but learning to ask the right questions.
Chat with Ezra
CoachCoach
Success isn't just about winning—it's about vision, patience, and playing the long game.
Chat with Coach

Add your answer:

Earn +20 pts
Q: Javascript function for the difference between 2 numbers?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Which function is used to randomize number in Excel?

There is a RAND function which can generate random numbers. The RANDBETWEEN function can generate numbers between a lower and upper limit.There is a RAND function which can generate random numbers. The RANDBETWEEN function can generate numbers between a lower and upper limit.There is a RAND function which can generate random numbers. The RANDBETWEEN function can generate numbers between a lower and upper limit.There is a RAND function which can generate random numbers. The RANDBETWEEN function can generate numbers between a lower and upper limit.There is a RAND function which can generate random numbers. The RANDBETWEEN function can generate numbers between a lower and upper limit.There is a RAND function which can generate random numbers. The RANDBETWEEN function can generate numbers between a lower and upper limit.There is a RAND function which can generate random numbers. The RANDBETWEEN function can generate numbers between a lower and upper limit.There is a RAND function which can generate random numbers. The RANDBETWEEN function can generate numbers between a lower and upper limit.There is a RAND function which can generate random numbers. The RANDBETWEEN function can generate numbers between a lower and upper limit.There is a RAND function which can generate random numbers. The RANDBETWEEN function can generate numbers between a lower and upper limit.There is a RAND function which can generate random numbers. The RANDBETWEEN function can generate numbers between a lower and upper limit.


What is the difference between two numbers is 10 If the numbers are doubled what is What is the difference between them?

the difference is also doubled


What is the difference between the two even numbers?

Subtract the two numbers to get their difference.


What is difference between the smallest and largest numbers?

the difference


How is the distance between two rational numbers related to their difference?

Directly. Their difference IS the difference between them.


What is the difference between argument and function in Excel?

A function is a built-in formula in Excel designed to do a particular task. Arguments are values that you provide to a function to do its task, like cell address that hold numbers that you want to use for the function. For example, the numbers and addresses in the following SUM function are arguments: =SUM( A2:A5, 7, 800, B18 )


What is the difference between two numbers?

The difference between two numbers is the second number subtracted from the first number.For example:The difference between 15 and 6 is 915-6=9


What is the difference between symmetrical numbers and numbers with symmetry?

There is no difference because watch this ... 3 0


The sum of the two numbers is 29 and the difference of their square is 145 The difference between the numbers is?

5


What is the difference between -39 and -45?

6


What is the percent difference between 1419 and 1286?

To find the percent difference between two numbers, you first calculate the absolute difference between the two numbers. In this case, the absolute difference between 1419 and 1286 is 133. Next, you divide this absolute difference by the average of the two numbers (1352.5) and multiply by 100 to get the percent difference. Therefore, the percent difference between 1419 and 1286 is approximately 9.82%.


Can you provide an example of how the keyword "function" is used in a programming language?

In programming, the keyword "function" is used to define a block of code that performs a specific task. For example, in JavaScript, you can create a function called "addNumbers" that takes two numbers as input and returns their sum. Here's an example: javascript function addNumbers(num1, num2) return num1 num2; let result addNumbers(5, 3); console.log(result); // Output: 8