Diferença JS entre dois números
var difference = function (a, b) { return Math.abs(a - b); }
Jolly Jackal
var difference = function (a, b) { return Math.abs(a - b); }
//Simple Function to add two numbers
const addTwoNums = (num1, num2) => {
let sum = num1 + num2;
return sum
}
console.log(addTwoNums(60, 9)) //function call and log the answer to the console
// program to add two numbers using a function
// declaring a function
function add(a, b) {
console.log(a + b);
}
// calling functions
add(3,4);
add(2,9);
// Prints the sum of 2 float numbers
function addition(number_1, number_2)
{
int sum = number_1 + number_2
document.write(sum)
}
var number_1 = parseFloat(prompt("First Number"));
var number_2 = parseFloat(prompt("Second Number"));
addition(number_1, number_2);