Had a question about this assignment
h
JamesCrowley (0)

I can't seem to get this if statement to function correctly. What am I doing wrong? Thanks.

You are viewing a single comment. View All
Answered by TheDrone7 (652) [earned 5 cycles]
View Answer
JamesCrowley (0)

@TheDrone7 I thought so, but I still can't seem to get it to work based on the syntax they're asking me to use in the assignment. Here is what I'm doing..

function exerciseFour(value){
  let greaterThanFive = false;
  // In this exercise, you will be given a variable, it will be called: value
  // You will also be given a variable named: greaterThanFive
  // Using an 'if' statement check to see if the value is greater than 5. If it is, re-assign greaterThanFive the boolean true.
  if (value > 5){
    let greaterThanFive = true;
  }
  exerciseFour(6);
  // Please write your answer in the line above.
return greaterThanFive;
}