+
+
+
\ No newline at end of file
diff --git a/Day1Exercise/Q6/index.html b/Day1Exercise/Q6/index.html
new file mode 100644
index 0000000..4c5b28e
--- /dev/null
+++ b/Day1Exercise/Q6/index.html
@@ -0,0 +1,25 @@
+
+
+
+
+
+ Banks
+
+
+
+
+
DBS
+
UOB
+
OCBC
+
Citi
+
+
+
+
\ No newline at end of file
diff --git a/Day1Exercise/README.md b/Day1Exercise/README.md
index a8e54cf..4e2bbec 100644
--- a/Day1Exercise/README.md
+++ b/Day1Exercise/README.md
@@ -48,4 +48,25 @@ Create code to reverse a string
## Self Assessment
-[Self Assessment](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps/Silly_story_generator)
\ No newline at end of file
+[Self Assessment](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps/Silly_story_generator)
+
+## Image Gallery
+
+[Image](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Image_gallery)
+
+## Bank List
+
+* Create an HTML document which shows a list of Banks. [use,
to create the list).
+
+```html
+
+
DBS
+
UOB
+
OCBC
+
Citi
+
+```
+* Write a javaScript function addNew(), which when called through a button-click in the HTML page, adds a new bank to the list in the HTML document.
+* New bank to add. “MYDigi bank”
+
+Tips: use “ appendChild() ” to ac a new child to list.
\ No newline at end of file
diff --git a/asignmentQ4and5solution/HM3.js b/asignmentQ4and5solution/HM3.js
index 72c8ba6..ae12986 100644
--- a/asignmentQ4and5solution/HM3.js
+++ b/asignmentQ4and5solution/HM3.js
@@ -6,25 +6,25 @@ const overlay = document.querySelector('.overlay');
//Looping image
-for(let i = 1; i <= 5; i++) {
+for (let i = 1; i <= 5; i++) {
const newImage = document.createElement('img');
newImage.setAttribute('src', 'pic' + i + '.jpg');
thumbBar.appendChild(newImage);
- newImage.onclick = function(e) {
+ newImage.onclick = function (e) {
displayedImage.src = e.target.src;
}
}
//Adding darken effect and revert option
-btn.onclick = function() {
+btn.onclick = function () {
const btnClass = btn.getAttribute('class');
- if(btnClass === 'dark') {
- btn.setAttribute('class','light');
+ if (btnClass === 'dark') {
+ btn.setAttribute('class', 'light');
btn.textContent = 'Lighten';
overlay.style.backgroundColor = 'rgba(0,0,0,0.5)';
} else {
- btn.setAttribute('class','dark');
+ btn.setAttribute('class', 'dark');
btn.textContent = 'Darken';
overlay.style.backgroundColor = 'rgba(0,0,0,0)';
}