Skip to content
This repository was archived by the owner on Aug 5, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
exercises done
finished my exercises
  • Loading branch information
Ade0211 committed Sep 19, 2020
commit 30ceb8d20630a345ea4b3504d95e88d465fa9bb0
8 changes: 4 additions & 4 deletions week-1/Homework/mandatory/1-debugging-practice/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function submit() {
return false;
} else {
let book = new Book(title.value, author.value, pages.value, check.checked);
library.push(book);
myLibrary.push(book);
render();
}
}
Expand Down Expand Up @@ -90,11 +90,11 @@ function render() {

//add delete button to every row and render again
let delButton = document.createElement("button");
delBut.id = i + 5;
cell5.appendChild(delBut);
delButton.id = i + 5;
cell5.appendChild(delButton);
delButton.className = "btn btn-warning";
delButton.innerHTML = "Delete";
delBut.addEventListener("clicks", function () {
delButton.addEventListener("click", function () {
alert(`You've deleted title: ${myLibrary[i].title}`);
myLibrary.splice(i, 1);
render();
Expand Down
6 changes: 4 additions & 2 deletions week-2/Homework/mandatory/2-fetch-exercise/exercise.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ Open index.html in your browser. Every time you refresh the page,
a different greeting should be displayed in the box.
*/

fetch('*** Write the API address here ***')
fetch('https://codeyourfuture.herokuapp.com/api/greetings')
.then(function(response) {
return response.text();
})
.then(function(greeting) {
// Write the code to display the greeting text here
});
let pEl = document.getElementById("greeting-text");
pEl.innerHTML = greeting;
}).catch(error => console.log(error));
4 changes: 2 additions & 2 deletions week-3/Homework/mandatory/2-exercises/3-atm.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ class ATM {
}
// Add your code here
make_deposit() {
console.log(`${this.amount}`)
console.log(`${this.amount = 200}`)

}
check_balance() {
console.log(`${this.amount}`)
}
make_withdraw() {
console.log(`${this.amount}`)
console.log(`${this.amount = 500}`)
}

}
Expand Down