Skip to content

Instantly share code, notes, and snippets.

@joliz
Created April 7, 2017 16:31
Show Gist options
  • Save joliz/abd886c347db5f57f4dadba1c25a62a7 to your computer and use it in GitHub Desktop.
Save joliz/abd886c347db5f57f4dadba1c25a62a7 to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=abd886c347db5f57f4dadba1c25a62a7
<!DOCTYPE html>
<html>
<head>
<title>For Loop do now</title>
</head>
<body>
<button>click here</button>
</body>
</html>
{"enabledLibraries":["jquery"]}
//button click handler
$("button").click(function(){
//for loop declaration
for(var count = 0; count < 101; count = count + 1){
//prints hello to the page body
$("body").append("<p>" + "<img src='https://i.scdn.co/image/63cad86cb183568085a4e5f0be86aa187cc511e4'>");
}
for(var i=0; 1<100; i++){
$("img").hide(10);
$("img").show(10);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment