<script>
function addNumbers(a, b) {
return a + b;
}
var sum = addNumbers(15, 25);
document.write('Sum of the numbers is: ' + sum);
</script>
// 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);
//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