diff --git a/css/style.css b/css/style.css index d17d83a..694334e 100644 --- a/css/style.css +++ b/css/style.css @@ -1,5 +1,6 @@ body { background-color: navy; + color: white; } diff --git a/index.html b/index.html index ef9a207..0551e11 100644 --- a/index.html +++ b/index.html @@ -4,15 +4,17 @@ - + + + - - + + @@ -33,7 +35,9 @@ - + + + The quickest of brown foxes. @@ -45,7 +49,7 @@ diff --git a/js/slide22.js b/js/slide22.js index e69de29..56cb79b 100644 --- a/js/slide22.js +++ b/js/slide22.js @@ -0,0 +1,12 @@ +let userInput = ""; +let result = ""; + +do { + userInput = prompt("Please enter the Integer less than 100"); + if (userInput < 100 && userInput > 0) { + result = userInput * userInput; + console.log("Number squared is:" + result); + break; + } + +} while (userInput > 100 || userInput < 0); \ No newline at end of file diff --git a/js/slide23.js b/js/slide23.js index e69de29..6c8fca3 100644 --- a/js/slide23.js +++ b/js/slide23.js @@ -0,0 +1,13 @@ +let lowerLimit = ""; +let upperLimit = ""; + +do { + lowerLimit = prompt("please enter lower limit"); + upperLimit = prompt("please enter Upper limit"); + if (lowerLimit < upperLimit) { + for (let i = lowerLimit; i < upperLimit; i++) { + console.log(i); + } + break; + } +} while (lowerLimit > upperLimit); diff --git a/js/slide24.js b/js/slide24.js index e69de29..bc2eea4 100644 --- a/js/slide24.js +++ b/js/slide24.js @@ -0,0 +1,21 @@ +let mydata = new Array(10); +let userInput = ""; +let userValue = ""; +for (let i = 0; i < 10; i++) { + mydata[i] = 1; +} +console.log(mydata); + +do { + userInput = prompt("Enter the index number"); + if (userInput < 0 || userInput >= 10) { + console.log("invalid range"); + break; + } + userValue = prompt("Enter the value for index"); + mydata[userInput] = userValue; + console.log("Modified Array"); + console.log(mydata); + + +} while (userInput >= 0 && userInput < 10); \ No newline at end of file diff --git a/js/slide25.js b/js/slide25.js index e69de29..bc2eea4 100644 --- a/js/slide25.js +++ b/js/slide25.js @@ -0,0 +1,21 @@ +let mydata = new Array(10); +let userInput = ""; +let userValue = ""; +for (let i = 0; i < 10; i++) { + mydata[i] = 1; +} +console.log(mydata); + +do { + userInput = prompt("Enter the index number"); + if (userInput < 0 || userInput >= 10) { + console.log("invalid range"); + break; + } + userValue = prompt("Enter the value for index"); + mydata[userInput] = userValue; + console.log("Modified Array"); + console.log(mydata); + + +} while (userInput >= 0 && userInput < 10); \ No newline at end of file diff --git a/js/slide26.js b/js/slide26.js index e69de29..952cc60 100644 --- a/js/slide26.js +++ b/js/slide26.js @@ -0,0 +1,14 @@ + +let integerArray = []; +for (let counter = 0; counter <= 59; counter++) { + + if (counter <= 1) { + integerArray[counter] = counter; + } else { + integerArray[counter] = integerArray[counter - 1] + integerArray[counter - 2]; + } +} + +for (let i = 0; i < integerArray.length; i++) { + console.log(integerArray[i]); +}