Created
March 15, 2017 15:08
-
-
Save sheafk/855bcad8bdf2c26dd73f90ebd4c29bc2 to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=855bcad8bdf2c26dd73f90ebd4c29bc2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>My first If statment</title> | |
</head> | |
<body> | |
<h1></h1> | |
<button>Press Me</button> | |
<h2></h2> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"enabledLibraries":["jquery"]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Change the code below so that the IF statement is no longer true. | |
if(1 < 2){ | |
$("h1").append("1 is less than 2!"); | |
} | |
//You Do | |
$("button").click(function() { | |
if(2 < 5) { | |
$("h2").html("Congratulations!"); | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment