diff --git a/InClass/Callbacks/exercise-1/exercise.js b/InClass/Callbacks/exercise-1/exercise.js
index 40f06b0..3b3ee65 100644
--- a/InClass/Callbacks/exercise-1/exercise.js
+++ b/InClass/Callbacks/exercise-1/exercise.js
@@ -10,4 +10,21 @@ Update your code to make the colour change every 5 seconds to something differen
Prefer to work on a codepen? https://codepen.io/makanti/pen/abOreLg
================
-*/
\ No newline at end of file
+*/
+
+//Task 1
+ // setTimeout(function bgColor() {
+ // document.body.style.backgroundColor = "blue";
+ // },5000);
+
+
+// Task-2
+
+
+setInterval(
+ function () {
+ //random hex colors generated
+ let randomColor = Math.floor(Math.random()*16777215).toString(16);
+ // let randomColor = Math.floor(Math.random() * 255);
+ document.body.style.backgroundColor = "#"+randomColor;
+ },5000);
\ No newline at end of file
diff --git a/InClass/Callbacks/exercise-2/exercise.js b/InClass/Callbacks/exercise-2/exercise.js
index eca9595..0931034 100644
--- a/InClass/Callbacks/exercise-2/exercise.js
+++ b/InClass/Callbacks/exercise-2/exercise.js
@@ -62,9 +62,42 @@ const movies = [
];
// create showMovies function
+function showMovies(movies){
+ const allMovies = document.getElementById("all-movies")
+ movies.forEach((movie) =>{
+ let newPara = document.createElement('p');
+ newPara.innerHTML = `${movie.title} by ${movie.director}`;
+ allMovies.appendChild(newPara);
+ })
+ document.getElementById("movies-number").innerHTML = movies.length;;
+}
+ showMovies(movies);
+// setTimeout(showMovies, 3000);
// create a new movie object for your favorite movie
+const myMovie = [];
+
+setTimeout(function addMovie(){
+ movies.map((movie) => {
+ if(movie.haveWatched === true){
+ myMovie.push(movie);
+ }
+ })
+ // return myMovie;
+ let newh1 = document.createElement("h1");
+ newh1.innerHTML = "My favourite Movies";
+ document.getElementById("all-movies").appendChild(newh1);
+ //call-back
+ showMovies(myMovie);}
+ , 2000);
+
+
+
+
+
+
+
// create addMovies function
diff --git a/InClass/DOM-practice/index.html b/InClass/DOM-practice/index.html
index 9c78866..2ea7481 100644
--- a/InClass/DOM-practice/index.html
+++ b/InClass/DOM-practice/index.html
@@ -3,7 +3,7 @@
- The Mothers of Tech
+ The Mothers of Tech
diff --git a/InClass/DOM-practice/main.js b/InClass/DOM-practice/main.js
index be9f609..d43baa1 100644
--- a/InClass/DOM-practice/main.js
+++ b/InClass/DOM-practice/main.js
@@ -4,10 +4,10 @@ console.log("Testing JS file loaded!")
// Without changing any of the HTML or CSS, update the tags so that they have white backgrounds.
-
-
-
-
+ const sec = document.getElementsByTagName('section');
+ for(let i = 0; i < sec.length; i++){
+ sec[i].style.backgroundColor = "white";
+ }
// Task 2
@@ -15,11 +15,25 @@ console.log("Testing JS file loaded!")
// Hint: look at the CSS to see if there are any classes already written which you can use.
+const images = document.getElementsByTagName('img');
+console.log(images);
+ for(let j = 0; j < images.length; j++){
+ images[j].classList.add("content-title")
+ }
+// Task 3
+// Google the date of birth and death of each of the people on the page. Without changing any of the HTML or CSS, add this in a paragraph to the end of their .
+const para1 = sec[0].getElementsByTagName("p");
+para1[2].append(" She was born in 9th December, 1906.");
-// Task 3
+const para2 = sec[1].getElementsByTagName("p");
+ para2[1].append(" She was born in 27th August, 1918");
-// Google the date of birth and death of each of the people on the page. Without changing any of the HTML or CSS, add this in a paragraph to the end of their .
+ const para3 = sec[2].getElementsByTagName("p");
+ console.log(para3);
+ para3[3].append(" She was born in 27th November, 1852")
+
+
\ No newline at end of file
diff --git a/mandatory/1-alarmclock/alarmclock.js b/mandatory/1-alarmclock/alarmclock.js
index 6ca81cd..6a0da83 100644
--- a/mandatory/1-alarmclock/alarmclock.js
+++ b/mandatory/1-alarmclock/alarmclock.js
@@ -1,4 +1,13 @@
-function setAlarm() {}
+function setAlarm() {
+ // let timeRemainCounter = document.getElementById("timeRemaining");
+ // let inputText = document.getElementById("alarmSet");
+ // let btnSet = document.getElementById("set");
+ // let btnStop = document.getElementById("stop");
+ // console.log(inputText.value);
+ let timeRemainingValue = inputText.value;
+ timeRemainingValue--;
+ timeRemainCounter.innerHTML = `Time Remaining: 00:0${timeRemainingValue}`;
+}
// DO NOT EDIT BELOW HERE
diff --git a/mandatory/1-alarmclock/index.html b/mandatory/1-alarmclock/index.html
index ab7d582..f931317 100644
--- a/mandatory/1-alarmclock/index.html
+++ b/mandatory/1-alarmclock/index.html
@@ -2,14 +2,12 @@
Alarm Clock
-
-
+ crossorigin="anonymous"/>
+
@@ -24,5 +22,6 @@