Skip to content
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

More consistent use of ES6 syntax #35

Open
bobbysebolao opened this issue Aug 29, 2019 · 0 comments
Open

More consistent use of ES6 syntax #35

bobbysebolao opened this issue Aug 29, 2019 · 0 comments
Assignees
Labels

Comments

@bobbysebolao
Copy link

Well done for using ES6 syntax in places; you've used arrow functions pretty consistently, with only one exception in validate.js where you've used the ES5 function keyword instead.

There are 9 places where you've used the var keyword to declare variables in your project. It's not best practice to declare variables this way, you should use let or const, depending on whether you need to reassign the variable's value or not.

Screen Shot 2019-08-29 at 10 33 33

Also, when you return a single statement from an arrow function, you don't need the curly brackets around the return statement. You can tweak your server function in server.js with this in mind.

@DanaEFalah DanaEFalah self-assigned this Aug 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants