-
Notifications
You must be signed in to change notification settings - Fork 2
Javascript3 - Week3-Project-AmirHossein #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
} | ||
} | ||
|
||
const abdulkareem = Person('Abdulkareem', 35, 'Riyadh', 'married', '3 children', 'construction worker', ['dates', 'smoke water pipe'] ); |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this. you have another getData function
|
||
|
||
|
||
function getData1() { |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why don't you use this function in the other examples or wasn't it not part of the homework?
No description provided.