Skip to content

No more vars in Web/API #16662

@wbamberg

Description

@wbamberg

This is the companion to #16614, but for Web/API.

Here's a spreadsheet: https://docs.google.com/spreadsheets/d/1sl6gT8o-7yRPymZprwn6PNBRLQ6KNsKPFILLntsL7gk/edit#gid=0 listing all the pages under Web/API that use var .

We should replace usages of var with const or let as appropriate.

If you want to help, please add a comment here and request access to the spreadsheet. Once you have access:

  • claim some pages by adding your name in the "Fixer" column
  • file a PR to fix them. Please add a reference to this issue, but don't use "Fixes (this issue)" because that will auto-close this issue when he PR is merged.
  • once you have filed a PR, add a link to the PR in the "PR" column
  • once the PR is merged, add "Done" in the "Status" column

Note that:

  • some of these examples are copied from examples in separate GitHub repositories. In these cases it would be great to update those repos as well, so the examples are the same in both places.
  • our policy is to "use const when we can, let when we have to".
  • I'm happy to review other "modern JS" updates, like using for...of rather than for, and template literals, and arrow functions. But it's not needed at this point.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions