Skip to content

Instantly share code, notes, and snippets.

@joseph45666
Created May 4, 2017 14:11
Show Gist options
  • Save joseph45666/4c660660c41a51115217a45de19dcf9b to your computer and use it in GitHub Desktop.
Save joseph45666/4c660660c41a51115217a45de19dcf9b to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=4c660660c41a51115217a45de19dcf9b
<!DOCTYPE html>
<html>
<head>
<title>For Loop do now</title>
</head>
<body>
</body>
</html>
{"enabledLibraries":["jquery"]}
// WE DO TOGETHER
// Step 1 Create a for loop
// Step 2 Declare the intial expression
// Step 3 Declare the condition
// Step 4 Declare the increment expression
// Step 5 In the body of the for loop, write the code that will append hello to the screen
//for( var count = 0;count < 24;{
// count = count+1){
// }
for(var count = 0; count < 100; count = count + 1){
$('body').append("<img src =https://thetab.com/blogs.dir/91/files/2017/01/beyonce-super-bowl-50.jpg>");
}
//EXTRA PRACTICE
// Write another for loop that prints every other number to the screen. Hint look at the increment expression.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment