-
Notifications
You must be signed in to change notification settings - Fork 209
Dzien_5 rozw. #1
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
Ami777
left a comment
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.
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.`); | ||
| }); |
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.
Ciekawe podejście do zadania :)
|
|
||
| app.get('/vote/:option', (req, res) => { | ||
| let {option} = req.params; | ||
| votes[option] = votes[option] + 1 || 1; |
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.
Super, krótko i uniwersalnie
|
|
||
| app.get('/votes/check', (req, res) => { | ||
| let results = ""; | ||
| for (let option in votes) { |
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.
Super
No description provided.