Skip to content

Instantly share code, notes, and snippets.

@joseph45666
Created May 4, 2017 14:11
Show Gist options
  • Save joseph45666/df7a9f457c52fe54bb3112af8105e503 to your computer and use it in GitHub Desktop.
Save joseph45666/df7a9f457c52fe54bb3112af8105e503 to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=df7a9f457c52fe54bb3112af8105e503
<!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