This repository was archived by the owner on Oct 26, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 453
Bashir week 7 #1011
Open
bash93
wants to merge
55
commits into
CodeYourFuture:master
Choose a base branch
from
bash93:Bashir-week-7
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Bashir week 7 #1011
Changes from 1 commit
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
d0eb2ef
added notes to w2-j4
Ashaghel c30ee0f
Hakona Matata Anthony and Ahmad
Ashaghel 74e3f46
fix minor spelling and grammatical errors
6fcaeb5
editing exercises for week3 mcr3
Ashaghel 468db41
Update 5-journey-planner.js
Ashaghel 6163944
Update 0- Introduction.md
Ashaghel 9346bcb
added info on every and some to exercise 2
Augs0 960c002
fixed formatting
Augs0 c5786a9
added info on replace and substring
Augs0 eb54bc5
Modify description and add extra tests to exercise week-3/4-eligible-…
zoltan-gal 191b122
fix syntax
zoltan-gal e20bef6
Add extra exercise to week-3/4-eligible-students
zoltan-gal 7905332
added small note
Ashaghel 6c489f4
Added more instructions
Ashaghel ce4cdb0
changed function name
Ashaghel 46747c0
Update 6-lane-names.js
Ashaghel 1422133
formating
Ashaghel 4feab6b
Add more details and restructure journey planner exercise
zoltan-gal 349fee5
Reformatting journey planner description
zoltan-gal fe6726a
Add extra challange tip to journey planner
zoltan-gal 9678006
Add examples and tweak descriptions
zoltan-gal 222a34b
tweak week-3 intro description
zoltan-gal ccc11b5
tweak week-3 intro description
zoltan-gal 7a91d2e
fix text
zoltan-gal 1a7abaf
Improve examples in ex4
zoltan-gal e84f22f
Merge remote-tracking branch 'origin/master' into manchester3
zoltan-gal f8f41b0
more info
Ashaghel 68f6d79
Create forinLoop.js
Ashaghel 57dc8b0
Select freecodecamp resource list
zoltan-gal 891b2aa
Add extra exercise and description to writers exercise
zoltan-gal e50722e
Add extra exercises to water bottle exercise
zoltan-gal 02492c9
Remove extra resources recommendations that have not been taught yet
zoltan-gal 394aab1
Merge branch 'manchester3' of github.com:CodeYourFuture/js-exercises …
zoltan-gal 1feffbe
Rewrite grocery list exercise
zoltan-gal 4a1fa48
Fix week-4 exercise issues
zoltan-gal a3c1d0c
more reading
Ashaghel 393cab1
Update 1-freecodecamp.md
Ashaghel 05218bc
Update extra-homework.md
Ashaghel f836b89
Update 1-freecodecamp.md
Ashaghel 90f6f0b
Update 1-freecodecamp.md
Ashaghel a4055ca
Update 1-freecodecamp.md
Ashaghel e559c9a
Update 2-writers.js
Ashaghel 9b87a3e
fix description
zoltan-gal 793cd96
tweak description
zoltan-gal 1d25f8e
Update 2-writers.js
55efde1
fix wording
zoltan-gal 27ce362
Rewrite week-5/2-exercises
zoltan-gal f555e27
Rewrite week-5/3-project
zoltan-gal 6053f8e
tweak khanakademy hw descriptions
zoltan-gal 37bc38e
add extra description to week-5, exercise 3
zoltan-gal 6409675
fix link
zoltan-gal b92dcd4
Merge remote-tracking branch 'origin/master' into manchester3
zoltan-gal ff6e285
Update week-6 exercise description
zoltan-gal 723a0c2
Submit week 6
bash93 ff9bb88
Submit week 7
bash93 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,8 +37,9 @@ function submit() { | |
alert("Please fill all fields!"); | ||
return false; | ||
} else { | ||
let book = new Book(title.value, title.value, pages.value, check.checked); | ||
let book = new Book(title.value, author.value, pages.value, check.checked); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
library.push(book); | ||
myLibrary.push(book); | ||
render(); | ||
} | ||
} | ||
|
@@ -54,7 +55,7 @@ function render() { | |
let table = document.getElementById("display"); | ||
let rowsNumber = table.rows.length; | ||
//delete old table | ||
for (let n = rowsNumber - 1; n > 0; n-- { | ||
for (let n = rowsNumber - 1; n > 0; n--) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
table.deleteRow(n); | ||
} | ||
//insert updated row and cells | ||
|
@@ -76,7 +77,7 @@ function render() { | |
changeBut.className = "btn btn-success"; | ||
cell4.appendChild(changeBut); | ||
let readStatus = ""; | ||
if (myLibrary[i].check == false) { | ||
if (myLibrary[i].check === true) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good 👍 |
||
readStatus = "Yes"; | ||
} else { | ||
readStatus = "No"; | ||
|
@@ -89,12 +90,12 @@ function render() { | |
}); | ||
|
||
//add delete button to every row and render again | ||
let delButton = document.createElement("button"); | ||
let delBut = document.createElement("button"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good 👍 |
||
delBut.id = i + 5; | ||
cell5.appendChild(delBut); | ||
delBut.className = "btn btn-warning"; | ||
delBut.innerHTML = "Delete"; | ||
delBut.addEventListener("clicks", function () { | ||
delBut.addEventListener("click", function () { | ||
alert(`You've deleted title: ${myLibrary[i].title}`); | ||
myLibrary.splice(i, 1); | ||
render(); | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good - always try to really understand the problem you're trying to solve and then some pseudocode is good for making you think about the code you need to write