Individual skill
const-let
Use when reviewing scripts, client components, bundles, or runtime behavior related to Prefer const and let over var. Inspect both source code and the browser execution path so fixes target the real bottleneck or bug.
skills/const-let/SKILL.md
Source commit e8d14d049010e2ce25afcd5e8609dfcbbe63e47e
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- Yes
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Network or broad shell
- Last checked
- Nov 9, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 74,686
- Repository last updated
- Oct 31, 2026
- License
- MIT
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- frontend Repository topic
- front-end-development Repository topic
- front-end-developer-tool Repository topic
- guidelines Repository topic
- checklist Repository topic
- reference Repository topic
- web-development Repository topic
- html Repository topic
- css Repository topic
- javascript Repository topic
- engineering Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
SKILL.mdcore · 1,880 bytesSKILL.mdcore · 1,880 bytesreferences/rule.mddoc · 2,697 bytes
Read excerpt
# Prefer const and let over var
var's function scope and hoisting behavior regularly causes bugs where variables are accessible outside the block they were declared in. const and let enforce block scope and make code intent clearer — const signals that a binding should not be reassigned, which helps readers understand data flow.
## Quick Reference
- Use const for values that are never reassigned
- Use let when reassignment is needed
- Never use var — it has function scope and is hoisted, causing subtle bugs
- const does not mean immutable — objects and arrays declared with const can still be mutated
## Check
Scan this JavaScript file for any use of var and flag every occurrence with line numbers.