Use "" + 5 + 6 to force it to strings.
This works with numerical variables too:
var a = 5;
var b = 6;
console.log("" + a + b);
<script>
function addNumbers(a, b) {
return a + b;
}
var sum = addNumbers(15, 25);
document.write('Sum of the numbers is: ' + sum);
</script>
const addTwoNumbers = (a,b)=>{
return a+b
}
console.log(addTwoNumbers(6,5))
// 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