Skip to content

Dzien_5 rozw.#1

Open
herbowicz wants to merge 8 commits intoCodersLab:masterfrom
herbowicz:master
Open

Dzien_5 rozw.#1
herbowicz wants to merge 8 commits intoCodersLab:masterfrom
herbowicz:master

Conversation

@herbowicz
Copy link

No description provided.

Copy link
Contributor

@Ami777 Ami777 left a comment

Choose a reason for hiding this comment

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

Brawo, uniwersalne i eleganckie rozwiązanie

names.indexOf(req.params.imie) < 0 ?
res.send(`Imię ${req.params.imie} nie zostało jeszcze zapisane.`) :
res.send(`Imię ${req.params.imie} zostało już zapisane.`);
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Ciekawe podejście do zadania :)


app.get('/vote/:option', (req, res) => {
let {option} = req.params;
votes[option] = votes[option] + 1 || 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

Super, krótko i uniwersalnie


app.get('/votes/check', (req, res) => {
let results = "";
for (let option in votes) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Super

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