Wednesday, November 20, 2013

blog 20

blog 20

What is the result of this code?

if ( 4>10)
{
    alert("Let's go down the first road!");
}
else
{
    // What should we do if the condition is false? 

    console.log("this is false")

}



5 comments:

  1. The code will overlooks the first condition because 4 is not greater than 10, and the monitor will display "this is false"

    ReplyDelete
  2. The code will ignore the first condition and the comment to display on the moniter 'this is false'

    ReplyDelete
  3. 4 is not greater than 10 so it will always go to the else and show "this is false"

    ReplyDelete
  4. since the code is if 4>10 then it says lets go down the first road, but since its false, it will show this is false.

    ReplyDelete
  5. The code will ignore the first one and show "this is false"
    -Zach

    ReplyDelete