exit a function in javascript
//javascript exit function using return
function add(a, b) {
// if a and b is empty then exit the function
if (!a && !b) {
return;
}
return a + b;
}
console.log(add(1, 3));
// 4
console.log(add());
// undefined