This is not actually a fcc challenge, but another challenge that I’m stuck on. I’m hoping someone can offer some insight on how to make the string display inside this HTML:
<body><p></p></body>
Right now it displays as:
<body><p>undefined</p></body>
Here’s the script:
//I need both of these functions, but the sixthsense() function has "undefined" for output. Can you make them work together?
function sensible(bool){
bool ? sense = "Common sense is quite common" : sense = "Common sense is not very common.";
};
sixthsense = function(){
var cLog = sensible(false);
document.body.querySelector('p').innerHTML = cLog;
};
sixthsense();