Skip to content

Added enum example in variables section. #25

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

Merged
merged 3 commits into from
May 30, 2019

Conversation

lucavictor220
Copy link
Contributor

No description provided.

README.md Outdated

```ts
enum GENRE {
ROMANTIC = 'Romantic',
Copy link
Member

Choose a reason for hiding this comment

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

What is the motivation behind this enum being string-based?
It is then arguable that it has advantage over bad example with just constants.

Would it be better maybe to use constant member, like:

enum Genre {
  Romantic,
  Drama,
  ...
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I rethought the intent and motivation of enum.

Copy link
Member

@dimadeveatii dimadeveatii left a comment

Choose a reason for hiding this comment

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

Much better now!
Please fix only the small typo I suggested in comments.

README.md Outdated
configureFilm(genre) {
switch (genre) {
case GENRE.ROMANTIC:
// some logit to be executed
Copy link
Member

Choose a reason for hiding this comment

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

Typo: logit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

README.md Outdated
configureFilm(genre) {
switch (genre) {
case GENRE.ROMANTIC:
// some logit to be executed
Copy link
Member

Choose a reason for hiding this comment

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

Same typo logit

@dimadeveatii dimadeveatii merged commit a00de96 into labs42io:master May 30, 2019
@dimadeveatii dimadeveatii mentioned this pull request May 30, 2019
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