Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Replace `var` with `let` and `const`

未关闭
#112 9 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

@gitdevjin 已经在做这个了。

开始于 2024年10月2日。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
45/100
Issue 类型
重构
描述清晰度
描述清楚
活跃度
停滞
技术栈
javascript
领域
backend

调研方向

首先检查 index.js 和 README.md,找出每一处 var 的使用,并检查其作用域和用法。然后根据情况将声明替换为 let 或 const,最后验证这两个文件中都不再包含 var 声明,并且文档中的示例仍与代码匹配。

由索引模型根据 Issue 内容生成。

描述

future
Description

According to the docs, using var is not recommended, unless it's necessary, It would be useful to replace var in index.js with let or const depending on their scope and usage. And also as it's less error-prone, this change can make the code more robust for the possible future code change.

Task
  • Replace var with let or const in index.js file
  • Updatevar with let or const in README.md file
Supporting Docs and Articles

w3schools variables
Why don’t we use var anymore?

主要语言
JavaScript
星标
2k
派生
236
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

expressjs/cookie-parser 的其他 Issue

查看 expressjs/cookie-parser 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。