Skip to content

Instantly share code, notes, and snippets.

@sheafk
Created March 15, 2017 15:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sheafk/855bcad8bdf2c26dd73f90ebd4c29bc2 to your computer and use it in GitHub Desktop.
Save sheafk/855bcad8bdf2c26dd73f90ebd4c29bc2 to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=855bcad8bdf2c26dd73f90ebd4c29bc2
<!DOCTYPE html>
<html>
<head>
<title>My first If statment</title>
</head>
<body>
<h1></h1>
<button>Press Me</button>
<h2></h2>
</body>
</html>
{"enabledLibraries":["jquery"]}
//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