Anonymous ID: 24c369 March 30, 2021, 12:20 p.m. No.13330960   🗄️.is 🔗kun   >>0995 >>1413 >>1587 >>1614

Any programming fags here? I’m a little hung up on this bit of code about Booleans.

 

Here’s the code from the learn JavaScript video I’m watching on YouTube :

 

function trueOrFalse(wasThatTrue) {

if (wasThatTrue) {

return “Yes, that was true”;

}

return “No, that was false”;

}

 

console.log(trueOrFalse(true));

 

“Yes, that was true”

 

(The red text being the console printing to the screen)

 

So my question is, in JavaScript after ‘if’ is called, is the first return statement always defaulted to true and the second always as false?

 

I ask this because in this line:

 

console.log(trueOrFalse(true));

 

They pass along ‘true’ but I didn’t see anywhere that was defined as what was true or false.

Anonymous ID: 24c369 March 30, 2021, 1:02 p.m. No.13331286   🗄️.is 🔗kun

When does the convention of states begin? I’m tired of this shit. This is massive tax payer funded invasion just so Democrats can keep power after the states clean up election laws. Why are my taxes paying for this?

 

https://twitter.com/seanhannity/status/1376941109788749827?s=21

Anonymous ID: 24c369 March 30, 2021, 1:41 p.m. No.13331599   🗄️.is 🔗kun   >>1632

>>13331413

>^right here, you told the bool you it was true… didn't even give it a chance to argue

 

So I believe I figured it out: (wasThatTrue) is a parameter built into the JavaScript language.