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
28 changes: 28 additions & 0 deletions edit-array.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="en">

<!-- ----------------------------------------------------------------- -->
<!-- ----------------------------------------------------------------- -->
<!-- ----------------------------------------------------------------- -->
<head> <!-- header begins here -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">

<link href="./css/style.css" rel="stylesheet">
<script type="text/javascript" src="./js/slide24.js"></script>

</head>
<body> <!-- body begins here -->


The quickest of brown foxes.


</body>
<!-- ---------------------------------------------------------------------------------- -->
<!-- ---------------------------------------------------------------------------------- -->
<!-- ---------------------------------------------------------------------------------- -->

</html>
28 changes: 28 additions & 0 deletions fibonnaci.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="en">

<!-- ----------------------------------------------------------------- -->
<!-- ----------------------------------------------------------------- -->
<!-- ----------------------------------------------------------------- -->
<head> <!-- header begins here -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">

<link href="./css/style.css" rel="stylesheet">
<script type="text/javascript" src="./js/slide26.js"></script>

</head>
<body> <!-- body begins here -->


The quickest of brown foxes.


</body>
<!-- ---------------------------------------------------------------------------------- -->
<!-- ---------------------------------------------------------------------------------- -->
<!-- ---------------------------------------------------------------------------------- -->

</html>
20 changes: 1 addition & 19 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,7 @@
<script type="text/javascript" src="./js/header-functions.js"></script>
<script type="text/javascript" src="./js/slide22.js"></script>

</head> <!-- header ends here -->
<!-- ----------------------------------------------------------------- -->
<!-- ----------------------------------------------------------------- -->
<!-- ----------------------------------------------------------------- -->












<!-- ---------------------------------------------------------------------------------- -->
<!-- ---------------------------------------------------------------------------------- -->
<!-- ---------------------------------------------------------------------------------- -->
</head>
<body> <!-- body begins here -->


Expand Down
17 changes: 17 additions & 0 deletions js/slide22.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// using a do while loop
let userInput;
do {
userInput = prompt("Enter a number greater than 0 and less than 100");
} while((userInput <= 0) || (userInput >= 100));
alert("You entered "+ userInput*userInput);

// using a while loop

// let userInput = prompt("Enter a number greater than 0 and less than 100");
// while((userInput <= 0) || (userInput >= 100)) {
// userInput = prompt("Enter a number greater than 0 and less than 100");
// }
// alert("You entered "+ userInput*userInput);


// I personally like do while loop for this case better since I can read the code from top to bottom and without repeat myself.
7 changes: 7 additions & 0 deletions js/slide23.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
let lowerLimit = prompt("Enter lower limit");
let upperLimit = prompt("Enter upper limit");
let array = [];
for(let i = lowerLimit ; i < upperLimit ; i++) {
array.push(i);
}
alert(array);
18 changes: 18 additions & 0 deletions js/slide24.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
let myData = new Array(10);
let cellIndex;
let newValue;
for (let i = 0; i < myData.length ; i++) {
myData[i]=1;
}
while(1) {
console.log(myData);
cellIndex = prompt("Enter the cell index");
newValue = prompt("Enter the new value");
if ((cellIndex < 0 || cellIndex >= myData.length)) {
alert("Invalid Input");
break;
} else {
myData[cellIndex] = parseInt(newValue);
}
}

Empty file removed js/slide25.js
Empty file.
7 changes: 7 additions & 0 deletions js/slide26.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
let newArray = [0,1];
for(let i = 2 ; i < 59; i++ ) {
let newValue = newArray[i-1] + newArray[i-2]
newArray.push(newValue);
}

console.log(newArray);
20 changes: 20 additions & 0 deletions print-interval.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="en">

<head> <!-- header begins here -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">

<link href="./css/style.css" rel="stylesheet">
<script type="text/javascript" src="./js/slide23.js"></script>
</head>
<body>

The quickest of brown foxes.

</body>


</html>