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

const #38

Open
ghost opened this issue Jun 6, 2019 · 0 comments
Open

const #38

ghost opened this issue Jun 6, 2019 · 0 comments

Comments

@ghost
Copy link

ghost commented Jun 6, 2019

some of the JavaScript examples look like this:

var func = function(x, y) {
   return x + y + 1;
};

however var is rarely what will be wanted with a function. better would be this:

const func = function(x, y) {
   return x + y + 1;
};

or it can be wrapped in a block if needed for the console or a bookmarklet:

{
   const func = function(x, y) {
      return x + y + 1;
   };
}
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

No branches or pull requests

0 participants