Created
July 19, 2017 22:17
-
-
Save DestinyLuong/963844832fa8a46bfea3d194ccb5e72f to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=963844832fa8a46bfea3d194ccb5e72f
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>For Loop do now</title> | |
</head> | |
<body> | |
<button>click here</button> | |
</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
//button click handler | |
$("button").click(function(){ | |
//for loop declaration | |
for(var beyonce = 1; beyonce < 101; beyonce = beyonce + 1){ | |
//var pixels = 5; | |
// $("img").css("height" , "img + 5px"); | |
//function pixels (x) { | |
//return x + 5; | |
//} | |
//prints hello to the page body | |
$("body").append("<img src= https://thetab.com/blogs.dir/91/files/2017/01/beyonce-super-bowl-50.jpg>"); | |
} | |
}); | |
//This code causes the numbers to count down in a list from a number to whatever number, when you press the button. There is a variable that.... But, you must add a 1 to the code, because a computer starts counting from 0. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment