Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion css/style.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
body {
background-color: navy;
background-color: lightslategray;
color: white;
}

a {
color: white;
}

object {
height: 100vh;
Expand Down
3 changes: 0 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,13 @@
<body> <!-- body begins here -->


The quickest of brown foxes.




<!-- ====================================================== -->
<!-- ====================================================== -->
<footer>
<!-- footer of page begins here -->
<script type="text/javascript" src="./js/footer-functions.js"></script>
</footer> <!-- footer of page ends here -->
<!-- ====================================================== -->
<!-- ====================================================== -->
Expand Down
7 changes: 7 additions & 0 deletions js/slide22.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
var num = 0;
do{
num = prompt("Enter an integer between 1 and 100");
} while(!(num > 0 && num < 100));

console.log("Number squared is: " + num*num);
document.write("<h1>Number squared is: " + num*num + "</h1>");
9 changes: 9 additions & 0 deletions js/slide23.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
var u = 0;
var l = 0;

l = prompt("Enter a 'lower limit' number");
u = prompt("Enter an 'upper limit' number");

for(l; l < u; l++) {
console.log(l + " ");
}
15 changes: 15 additions & 0 deletions js/slide24.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
var myData=[];
for(let x = 0; x < 10; x++) {
myData.push(1);
}
console.log(myData);

do {
var cellIndex = prompt("Enter a cell index to change");
if(cellIndex < 0 || cellIndex >= 10) { break; }
var newValue = prompt("Enter new value for cell index " + cellIndex);
myData[cellIndex] = newValue;
console.log("New array:" + myData)
} while(cellIndex >= 0 && cellIndex < 10);


15 changes: 15 additions & 0 deletions js/slide25.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
var myData=[];
for(let x = 0; x < 10; x++) {
myData.push(1);
}
console.log(myData);

console.log("Simulating user input for slide 25....");
var y = 0;
for(let x = 0; x < 10; x++) {
y += 5;
console.log("Changing value in index " + x + " to " + y);
myData[x] = y;
}

console.log(myData)
22 changes: 22 additions & 0 deletions js/slide26.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
var fibonacci = [0, 1];
for(let x = 0; x < 58; x++) {
fibonacci.push(fibonacci[x] + fibonacci[x+1]);
}
console.log("f(0) to f(59)");
console.log(fibonacci);

// function fibonacci(n) {
// if(n == 0) {
// return 0;
// }
// if(n == 1) {
// return 1;
// }
// else {
// fibonacci(n) = fibonacci(n-1) + fibonacci(n-2);
// }
// }

// for(let x = 0; x < 59; x++) {
// console.log(fibonacci(x));
// }