Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@amirhshad
Copy link

No description provided.

}
}

const abdulkareem = Person('Abdulkareem', 35, 'Riyadh', 'married', '3 children', 'construction worker', ['dates', 'smoke water pipe'] );
Copy link

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)
Copy link

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) {
Copy link

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() {
Copy link

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) {
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.