Javascript3 - Week3-Project-AmirHossein#6
Open
amirhshad wants to merge 11 commits intosamravan:masterfrom
Open
Javascript3 - Week3-Project-AmirHossein#6amirhshad wants to merge 11 commits intosamravan:masterfrom
amirhshad wants to merge 11 commits intosamravan:masterfrom
Conversation
n4cr
requested changes
Jan 27, 2021
| } | ||
| } | ||
|
|
||
| const abdulkareem = Person('Abdulkareem', 35, 'Riyadh', 'married', '3 children', 'construction worker', ['dates', 'smoke water pipe'] ); |
There was a problem hiding this comment.
In your constructor age is the third input while here you have 35 as second. Ordering matters for unnamed arguments.
| async function getData(url) { | ||
| try { | ||
| const response = await fetch(url); | ||
| return console.log(response) |
There was a problem hiding this comment.
This is wrong, you're returning console.log() output which is empty. You should return the promise in getData.
| @@ -0,0 +1,58 @@ | |||
| function getData(url) { | |||
There was a problem hiding this comment.
Remove this. you have another getData function
|
|
||
|
|
||
|
|
||
| function getData1() { |
There was a problem hiding this comment.
This function is strange. You don't have a param url yet you use it in there. If you don't reuse this function you might as well just call what's inside it without defining it.
| @@ -0,0 +1,8 @@ | |||
|
|
|||
| // const errorBox = elFactory('div', {id: 'error'}); | |||
| async function fetchData(url) { | |||
There was a problem hiding this comment.
why don't you use this function in the other examples or wasn't it not part of the homework?
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.