Basic JavaScript - Use Conditional Logic with If Statements

Tell us what’s happening:
Describe your issue in detail here.

   **Your code so far**
function trueOrFalse(wasThatTrue) {
 // Only change code below this line
function ourTrueOrFalse(isItTrue) {
 return "No, it's false";
}
return "Yes, it's true";
}

function TrueOrFalse(wasThatTrue) {
 if(wasThatTrue)
  { return "No, that was false";
 }
 return "Yes, that was true";
}



console.log(trueOrFalse(true));

 // Only change code above this line
   **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.81 Safari/537.36 Edg/104.0.1293.47

Challenge: Basic JavaScript - Use Conditional Logic with If Statements

Link to the challenge:
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/use-conditional-logic-with-if-statements

Hello there.

Do you have a question?

If so, please edit your post to include it in the Tell us what’s happening section.

Learning to describe problems is hard, but it is an important part of learning how to code.

Also, the more information you give us, the more likely we are to be able to help.

im having trouble fulfilling the last two parts of this problem out of 5

it says in the last two of the checklist, make it say true make it say false, but i dont understand

Why do you have the function twice?

I dont know i watched the video and copied everything down after listening it still didnt run

i tried everything still nothing

Don’t copy the video. That’s a proven way to get yourself deep into the curriculum without the ability to write code for yourself.

Delete one of these two and I can help you fix the other one.

1 Like

ok chose the first one now what

meaning i wrote the first one

You need an if statement in there somewhere. What do the instructions want you to check?

if something is true or false or was true or false?

So you need to have if (myCondition) { somewhere, where myCondition is the thing that you want to check to see if it is true.

Do you still need help?