Skip to content

BER Webdev PT 012024 Nil Erden#2997

Open
nil-e wants to merge 4 commits into
ironhack-labs:masterfrom
nil-e:master
Open

BER Webdev PT 012024 Nil Erden#2997
nil-e wants to merge 4 commits into
ironhack-labs:masterfrom
nil-e:master

Conversation

@nil-e

@nil-e nil-e commented Mar 22, 2024

Copy link
Copy Markdown

When I tried doing the lab I found out that the PunkAPI is down and it will be decommissioned soon as well. So I used another api to get product data. So i am not really displaying beers but it should follow the same logic.

@nil-e nil-e changed the title Almost done - wip BER Webdev PT 012024 Nil Erden Mar 26, 2024
Comment thread app.js
return productData;
})
.then(() => {
for (let i = 0; i < 25; i++) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. avoid for loop with let i =0 sync, here you have define the length everytime. (use better available options .forEach, for(const each of array)

Comment thread app.js
}
return itemNames;
})
.then(() => res.render('beers', { itemNames }))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when you returning in previous .then() you can just receive it as parameter, there is no need of using itemNames variable to store it (unless needed) [Promise Chaining]

@stale

stale Bot commented Oct 20, 2025

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it didn't have any recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the stale label Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants