1. Standardizing JavaScript for a Project
Frontend DeveloperBackground
A developer received a legacy JavaScript file with inconsistent indentation and missing semicolons.
Problem
The code is difficult to read and violates the team's style guide.
How to use
Paste the code, select 'JavaScript', enable 'Use Semicolons', and set 'Indent Size' to 2.
language: javascript, indentSize: 2, semi: true, singleQuote: falseOutcome
The code is automatically indented with 2 spaces, all missing semicolons are added, and the structure is clean and compliant.