when I console.log this function, why does it print 12 and undefined? Shouldn't it just be undefined as the function is not returning anything?
function area(w,h) {
console.log(w*h)
}
console.log(area (3,4))
EDIT: Sorry super new and I thought that regardless of what is printed by the console.log, the second console.log would receive only what the function returned.