diff --git a/index.html b/index.html new file mode 100644 index 0000000..77b81ba --- /dev/null +++ b/index.html @@ -0,0 +1,12 @@ + + + + + + JS Loops Lab + + + + + + \ No newline at end of file diff --git a/loops.js b/loops.js new file mode 100644 index 0000000..d951511 --- /dev/null +++ b/loops.js @@ -0,0 +1,105 @@ +//JavaScript Loops Lab + +// 1) One to Ten +console.log ("One to Ten"); + +for (let i=1; i<=10; i++) { + console.log (i); +} + + + +// 2) Squares +console.log ("Squares"); + +for (let i=1; i<=10; i++) { + let square = i*i; + console.log (square); +} + + + +// 3) Even Under N +console.log ("Even Under N"); + +let n = 20; +for (let i=2; i