This.
Console.Log is looking for a string to print to the console. the function trueOrFalse, outputs the yes or no answer, but expects 'wasThatTrue' as a boolean 'true' or 'false'
This.
Console.Log is looking for a string to print to the console. the function trueOrFalse, outputs the yes or no answer, but expects 'wasThatTrue' as a boolean 'true' or 'false'
wasThatTrue is just the name of the local variable. It's scope is limited to only inside that function call.
function trueOrFalse(imNotWearingAnyPants) {
if (imNotWearingAnyPants) {
return “Yes, that was true”;
}
return “No, that was false”;
}
console.log(trueOrFalse(true));