Created
April 24, 2017 14:51
-
-
Save wismer/503464d1419d44899116ecdf122d924c to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=503464d1419d44899116ecdf122d924c
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 count = 0; count < 6; count = count + 1){ | |
//prints hello to the page body | |
$("body").append("<p>" + count + "</p>"); | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment