javaScript decision making


#1


https://www.codecademy.com/courses/learn-javascript/lessons/control-flow/exercises/if-else-statements?action=lesson_resume&link_content_target=interstitial_lesson


I am learning code for if/else statement(harryPotterFan code),and my code doesnt work properly.I gave coding for 'false',but it executes true statement.


var harryPotterFan=false;
if(harryPotterFan)
  {
    console.log('I lead a muggle\'s life.');
  }else{
    console.log('Mischief managed.');
  }


#2

Switch the two console.log's and your code should pass you should be printing out,

I lead a muggle\'s life.


#3

okay thank you.
now my code is running


#4