即使函数返回,为什么samSays
在函数内部也不起作用?
function drivinSchool() {
var samSays = samSaysf();
if(samSaysf === "hi there"){
return "talks while driving"
}
else{
return "doesn't talk only drives"
}
}
function samSaysf() {
return "hi there"
}
console.log(drivinSchool());