diff:
diff --git a/file0.js b/file0.js
@@ -1,1 +1,1 @@
-var count = 0
+let count = 0

comment: Use `let` or `const` instead of `var` for block scoping.


Use strict equality `===` instead of `==`.


diff:
diff --git a/file2.js b/file2.js
@@ -1,1 +1,1 @@
-function greet(name) { return 'Hello ' + name }
+const greet = (name) => `Hello ${name}`;

comment: Use arrow functions and template literals for cleaner syntax.


diff:
diff --git a/file3.js b/file3.js
@@ -1,1 +1,1 @@
-console.log('Value: ' + value)
+console.log(`Value: ${value}`)

comment: Prefer template literals over string concatenation.


diff:
diff --git a/file4.js b/file4.js
@@ -1,1 +1,1 @@
-for (var i = 0; i < arr.length; i++) { doSomething(arr[i]); }
+for (const item of arr) { doSomething(item); }

comment: Use `for...of` with `const` for cleaner iteration.


diff:
diff --git a/file5.js b/file5.js
@@ -1,1 +1,1 @@
-function add(a, b) { return a + b }
+function add(a = 0, b = 0) { return a + b; }

comment: Provide default parameter values to avoid `undefined`.


diff:
diff --git a/file6.js b/file6.js
@@ -1,1 +1,1 @@
-const result = x ? x : 10
+const result = x || 10;

comment: Use logical OR `||` for default values.


diff:
diff --git a/file7.js b/file7.js
@@ -1,1 +1,1 @@
-let obj = { a: a, b: b }
+let obj = { a, b };

comment: Use object property shorthand when key and variable name match.


diff:
diff --git a/file8.js b/file8.js
@@ -1,1 +1,1 @@
-if (!Array.isArray(items)) { return false }
+if (!Array.isArray(items)) return false;

comment: Use concise single-line `if` statements for simple returns.


diff:
diff --git a/file9.js b/file9.js
@@ -1,1 +1,1 @@
-var sum = 0;
arr.forEach(function(n) { sum += n; });
+const sum = arr.reduce((acc, n) => acc + n, 0);

comment: Use `Array.prototype.reduce` instead of manual accumulation.


diff:
diff --git a/file10.js b/file10.js
@@ -1,1 +1,1 @@
-var count = 0
+let count = 0


diff:
diff --git a/file12.js b/file12.js
@@ -1,1 +1,1 @@
-function greet(name) { return 'Hello ' + name }
+const greet = (name) => `Hello ${name}`;


diff:
diff --git a/file13.js b/file13.js
@@ -1,1 +1,1 @@
-console.log('Value: ' + value)
+console.log(`Value: ${value}`)


diff:
diff --git a/file14.js b/file14.js
@@ -1,1 +1,1 @@
-for (var i = 0; i < arr.length; i++) { doSomething(arr[i]); }
+for (const item of arr) { doSomething(item); }


diff:
diff --git a/file15.js b/file15.js
@@ -1,1 +1,1 @@
-function add(a, b) { return a + b }
+function add(a = 0, b = 0) { return a + b; }


diff:
diff --git a/file16.js b/file16.js
@@ -1,1 +1,1 @@
-const result = x ? x : 10
+const result = x || 10;

comment: Use logical OR `||` for default values.


diff:
diff --git a/file17.js b/file17.js
@@ -1,1 +1,1 @@
-let obj = { a: a, b: b }
+let obj = { a, b };


diff:
diff --git a/file18.js b/file18.js
@@ -1,1 +1,1 @@
-if (!Array.isArray(items)) { return false }
+if (!Array.isArray(items)) return false;


diff:
diff --git a/file19.js b/file19.js
@@ -1,1 +1,1 @@
-var sum = 0;
arr.forEach(function(n) { sum += n; });
+const sum = arr.reduce((acc, n) => acc + n, 0);


diff:
diff --git a/file20.js b/file20.js
@@ -1,1 +1,1 @@
-var count = 0
+let count = 0


diff:
diff --git a/file22.js b/file22.js
@@ -1,1 +1,1 @@
-function greet(name) { return 'Hello ' + name }
+const greet = (name) => `Hello ${name}`;


diff:
diff --git a/file23.js b/file23.js
@@ -1,1 +1,1 @@
-console.log('Value: ' + value)
+console.log(`Value: ${value}`)


diff:
diff --git a/file24.js b/file24.js
@@ -1,1 +1,1 @@
-for (var i = 0; i < arr.length; i++) { doSomething(arr[i]); }
+for (const item of arr) { doSomething(item); }


diff:
diff --git a/file25.js b/file25.js
@@ -1,1 +1,1 @@
-function add(a, b) { return a + b }
+function add(a = 0, b = 0) { return a + b; }


diff:
diff --git a/file26.js b/file26.js
@@ -1,1 +1,1 @@
-const result = x ? x : 10
+const result = x || 10;

comment: Use logical OR `||` for default values.


diff:
diff --git a/file27.js b/file27.js
@@ -1,1 +1,1 @@
-let obj = { a: a, b: b }
+let obj = { a, b };


diff:
diff --git a/file28.js b/file28.js
@@ -1,1 +1,1 @@
-if (!Array.isArray(items)) { return false }
+if (!Array.isArray(items)) return false;


diff:
diff --git a/file29.js b/file29.js
@@ -1,1 +1,1 @@
-var sum = 0;
arr.forEach(function(n) { sum += n; });
+const sum = arr.reduce((acc, n) => acc + n, 0);


diff:
diff --git a/file30.js b/file30.js
@@ -1,1 +1,1 @@
-var count = 0
+let count = 0


diff:
diff --git a/file32.js b/file32.js
@@ -1,1 +1,1 @@
-function greet(name) { return 'Hello ' + name }
+const greet = (name) => `Hello ${name}`;


diff:
diff --git a/file33.js b/file33.js
@@ -1,1 +1,1 @@
-console.log('Value: ' + value)
+console.log(`Value: ${value}`)


diff:
diff --git a/file34.js b/file34.js
@@ -1,1 +1,1 @@
-for (var i = 0; i < arr.length; i++) { doSomething(arr[i]); }
+for (const item of arr) { doSomething(item); }


diff:
diff --git a/file35.js b/file35.js
@@ -1,1 +1,1 @@
-function add(a, b) { return a + b }
+function add(a = 0, b = 0) { return a + b; }


diff:
diff --git a/file36.js b/file36.js
@@ -1,1 +1,1 @@
-const result = x ? x : 10
+const result = x || 10;

comment: Use logical OR `||` for default values.


diff:
diff --git a/file37.js b/file37.js
@@ -1,1 +1,1 @@
-let obj = { a: a, b: b }
+let obj = { a, b };


diff:
diff --git a/file38.js b/file38.js
@@ -1,1 +1,1 @@
-if (!Array.isArray(items)) { return false }
+if (!Array.isArray(items)) return false;


diff:
diff --git a/file39.js b/file39.js
@@ -1,1 +1,1 @@
-var sum = 0;
arr.forEach(function(n) { sum += n; });
+const sum = arr.reduce((acc, n) => acc + n, 0);


diff:
diff --git a/file40.js b/file40.js
@@ -1,1 +1,1 @@
-var count = 0
+let count = 0


diff:
diff --git a/file42.js b/file42.js
@@ -1,1 +1,1 @@
-function greet(name) { return 'Hello ' + name }
+const greet = (name) => `Hello ${name}`;


diff:
diff --git a/file43.js b/file43.js
@@ -1,1 +1,1 @@
-console.log('Value: ' + value)
+console.log(`Value: ${value}`)


diff:
diff --git a/file44.js b/file44.js
@@ -1,1 +1,1 @@
-for (var i = 0; i < arr.length; i++) { doSomething(arr[i]); }
+for (const item of arr) { doSomething(item); }


diff:
diff --git a/file45.js b/file45.js
@@ -1,1 +1,1 @@
-function add(a, b) { return a + b }
+function add(a = 0, b = 0) { return a + b; }


diff:
diff --git a/file46.js b/file46.js
@@ -1,1 +1,1 @@
-const result = x ? x : 10
+const result = x || 10;

comment: Use logical OR `||` for default values.


diff:
diff --git a/file47.js b/file47.js
@@ -1,1 +1,1 @@
-let obj = { a: a, b: b }
+let obj = { a, b };


diff:
diff --git a/file48.js b/file48.js
@@ -1,1 +1,1 @@
-if (!Array.isArray(items)) { return false }
+if (!Array.isArray(items)) return false;


diff:
diff --git a/file49.js b/file49.js
@@ -1,1 +1,1 @@
-var sum = 0;
arr.forEach(function(n) { sum += n; });
+const sum = arr.reduce((acc, n) => acc + n, 0);


diff:
diff --git a/file50.js b/file50.js
@@ -1,1 +1,1 @@
-var count = 0
+let count = 0


diff:
diff --git a/file52.js b/file52.js
@@ -1,1 +1,1 @@
-function greet(name) { return 'Hello ' + name }
+const greet = (name) => `Hello ${name}`;


diff:
diff --git a/file53.js b/file53.js
@@ -1,1 +1,1 @@
-console.log('Value: ' + value)
+console.log(`Value: ${value}`)


diff:
diff --git a/file54.js b/file54.js
@@ -1,1 +1,1 @@
-for (var i = 0; i < arr.length; i++) { doSomething(arr[i]); }
+for (const item of arr) { doSomething(item); }


diff:
diff --git a/file55.js b/file55.js
@@ -1,1 +1,1 @@
-function add(a, b) { return a + b }
+function add(a = 0, b = 0) { return a + b; }


diff:
diff --git a/file56.js b/file56.js
@@ -1,1 +1,1 @@
-const result = x ? x : 10
+const result = x || 10;

comment: Use logical OR `||` for default values.


diff:
diff --git a/file57.js b/file57.js
@@ -1,1 +1,1 @@
-let obj = { a: a, b: b }
+let obj = { a, b };


diff:
diff --git a/file58.js b/file58.js
@@ -1,1 +1,1 @@
-if (!Array.isArray(items)) { return false }
+if (!Array.isArray(items)) return false;


diff:
diff --git a/file59.js b/file59.js
@@ -1,1 +1,1 @@
-var sum = 0;
arr.forEach(function(n) { sum += n; });
+const sum = arr.reduce((acc, n) => acc + n, 0);


diff:
diff --git a/file60.js b/file60.js
@@ -1,1 +1,1 @@
-var count = 0
+let count = 0


diff:
diff --git a/file62.js b/file62.js
@@ -1,1 +1,1 @@
-function greet(name) { return 'Hello ' + name }
+const greet = (name) => `Hello ${name}`;


diff:
diff --git a/file63.js b/file63.js
@@ -1,1 +1,1 @@
-console.log('Value: ' + value)
+console.log(`Value: ${value}`)


diff:
diff --git a/file64.js b/file64.js
@@ -1,1 +1,1 @@
-for (var i = 0; i < arr.length; i++) { doSomething(arr[i]); }
+for (const item of arr) { doSomething(item); }


diff:
diff --git a/file65.js b/file65.js
@@ -1,1 +1,1 @@
-function add(a, b) { return a + b }
+function add(a = 0, b = 0) { return a + b; }


diff:
diff --git a/file66.js b/file66.js
@@ -1,1 +1,1 @@
-const result = x ? x : 10
+const result = x || 10;

comment: Use logical OR `||` for default values.


diff:
diff --git a/file67.js b/file67.js
@@ -1,1 +1,1 @@
-let obj = { a: a, b: b }
+let obj = { a, b };


diff:
diff --git a/file68.js b/file68.js
@@ -1,1 +1,1 @@
-if (!Array.isArray(items)) { return false }
+if (!Array.isArray(items)) return false;


diff:
diff --git a/file69.js b/file69.js
@@ -1,1 +1,1 @@
-var sum = 0;
arr.forEach(function(n) { sum += n; });
+const sum = arr.reduce((acc, n) => acc + n, 0);


diff:
diff --git a/file70.js b/file70.js
@@ -1,1 +1,1 @@
-var count = 0
+let count = 0


diff:
diff --git a/file72.js b/file72.js
@@ -1,1 +1,1 @@
-function greet(name) { return 'Hello ' + name }
+const greet = (name) => `Hello ${name}`;


diff:
diff --git a/file73.js b/file73.js
@@ -1,1 +1,1 @@
-console.log('Value: ' + value)
+console.log(`Value: ${value}`)


diff:
diff --git a/file74.js b/file74.js
@@ -1,1 +1,1 @@
-for (var i = 0; i < arr.length; i++) { doSomething(arr[i]); }
+for (const item of arr) { doSomething(item); }


diff:
diff --git a/file75.js b/file75.js
@@ -1,1 +1,1 @@
-function add(a, b) { return a + b }
+function add(a = 0, b = 0) { return a + b; }


diff:
diff --git a/file76.js b/file76.js
@@ -1,1 +1,1 @@
-const result = x ? x : 10
+const result = x || 10;

comment: Use logical OR `||` for default values.


diff:
diff --git a/file77.js b/file77.js
@@ -1,1 +1,1 @@
-let obj = { a: a, b: b }
+let obj = { a, b };


diff:
diff --git a/file78.js b/file78.js
@@ -1,1 +1,1 @@
-if (!Array.isArray(items)) { return false }
+if (!Array.isArray(items)) return false;


diff:
diff --git a/file79.js b/file79.js
@@ -1,1 +1,1 @@
-var sum = 0;
arr.forEach(function(n) { sum += n; });
+const sum = arr.reduce((acc, n) => acc + n, 0);


diff:
diff --git a/file80.js b/file80.js
@@ -1,1 +1,1 @@
-var count = 0
+let count = 0


diff:
diff --git a/file82.js b/file82.js
@@ -1,1 +1,1 @@
-function greet(name) { return 'Hello ' + name }
+const greet = (name) => `Hello ${name}`;


diff:
diff --git a/file83.js b/file83.js
@@ -1,1 +1,1 @@
-console.log('Value: ' + value)
+console.log(`Value: ${value}`)


diff:
diff --git a/file84.js b/file84.js
@@ -1,1 +1,1 @@
-for (var i = 0; i < arr.length; i++) { doSomething(arr[i]); }
+for (const item of arr) { doSomething(item); }


diff:
diff --git a/file85.js b/file85.js
@@ -1,1 +1,1 @@
-function add(a, b) { return a + b }
+function add(a = 0, b = 0) { return a + b; }


diff:
diff --git a/file86.js b/file86.js
@@ -1,1 +1,1 @@
-const result = x ? x : 10
+const result = x || 10;

comment: Use logical OR `||` for default values.


diff:
diff --git a/file87.js b/file87.js
@@ -1,1 +1,1 @@
-let obj = { a: a, b: b }
+let obj = { a, b };


diff:
diff --git a/file88.js b/file88.js
@@ -1,1 +1,1 @@
-if (!Array.isArray(items)) { return false }
+if (!Array.isArray(items)) return false;


diff:
diff --git a/file89.js b/file89.js
@@ -1,1 +1,1 @@
-var sum = 0;
arr.forEach(function(n) { sum += n; });
+const sum = arr.reduce((acc, n) => acc + n, 0);


diff:
diff --git a/file90.js b/file90.js
@@ -1,1 +1,1 @@
-var count = 0
+let count = 0


diff:
diff --git a/file92.js b/file92.js
@@ -1,1 +1,1 @@
-function greet(name) { return 'Hello ' + name }
+const greet = (name) => `Hello ${name}`;


diff:
diff --git a/file93.js b/file93.js
@@ -1,1 +1,1 @@
-console.log('Value: ' + value)
+console.log(`Value: ${value}`)


diff:
diff --git a/file94.js b/file94.js
@@ -1,1 +1,1 @@
-for (var i = 0; i < arr.length; i++) { doSomething(arr[i]); }
+for (const item of arr) { doSomething(item); }


diff:
diff --git a/file95.js b/file95.js
@@ -1,1 +1,1 @@
-function add(a, b) { return a + b }
+function add(a = 0, b = 0) { return a + b; }


diff:
diff --git a/file96.js b/file96.js
@@ -1,1 +1,1 @@
-const result = x ? x : 10
+const result = x || 10;

comment: Use logical OR `||` for default values.


diff:
diff --git a/file97.js b/file97.js
@@ -1,1 +1,1 @@
-let obj = { a: a, b: b }
+let obj = { a, b };


diff:
diff --git a/file98.js b/file98.js
@@ -1,1 +1,1 @@
-if (!Array.isArray(items)) { return false }
+if (!Array.isArray(items)) return false;


diff:
diff --git a/file99.js b/file99.js
@@ -1,1 +1,1 @@
-var sum = 0;
arr.forEach(function(n) { sum += n; });
+const sum = arr.reduce((acc, n) => acc + n, 0);


diff:
diff --git a/file100.js b/file100.js
@@ -1,1 +1,1 @@
-var count = 0
+let count = 0


diff:
diff --git a/file102.js b/file102.js
@@ -1,1 +1,1 @@
-function greet(name) { return 'Hello ' + name }
+const greet = (name) => `Hello ${name}`;


diff:
diff --git a/file103.js b/file103.js
@@ -1,1 +1,1 @@
-console.log('Value: ' + value)
+console.log(`Value: ${value}`)


diff:
diff --git a/file104.js b/file104.js
@@ -1,1 +1,1 @@
-for (var i = 0; i < arr.length; i++) { doSomething(arr[i]); }
+for (const item of arr) { doSomething(item); }


diff:
diff --git a/file105.js b/file105.js
@@ -1,1 +1,1 @@
-function add(a, b) { return a + b }
+function add(a = 0, b = 0) { return a + b; }


diff:
diff --git a/file106.js b/file106.js
@@ -1,1 +1,1 @@
-const result = x ? x : 10
+const result = x || 10;

comment: Use logical OR `||` for default values.


diff:
diff --git a/file107.js b/file107.js
@@ -1,1 +1,1 @@
-let obj = { a: a, b: b }
+let obj = { a, b };


diff:
diff --git a/file108.js b/file108.js
@@ -1,1 +1,1 @@
-if (!Array.isArray(items)) { return false }
+if (!Array.isArray(items)) return false;


diff:
diff --git a/file109.js b/file109.js
@@ -1,1 +1,1 @@
-var sum = 0;
arr.forEach(function(n) { sum += n; });
+const sum = arr.reduce((acc, n) => acc + n, 0);


diff:
diff --git a/file110.js b/file110.js
@@ -1,1 +1,1 @@
-var count = 0
+let count = 0


diff:
diff --git a/file112.js b/file112.js
@@ -1,1 +1,1 @@
-function greet(name) { return 'Hello ' + name }
+const greet = (name) => `Hello ${name}`;


diff:
diff --git a/file113.js b/file113.js
@@ -1,1 +1,1 @@
-console.log('Value: ' + value)
+console.log(`Value: ${value}`)


diff:
diff --git a/file114.js b/file114.js
@@ -1,1 +1,1 @@
-for (var i = 0; i < arr.length; i++) { doSomething(arr[i]); }
+for (const item of arr) { doSomething(item); }


diff:
diff --git a/file115.js b/file115.js
@@ -1,1 +1,1 @@
-function add(a, b) { return a + b }
+function add(a = 0, b = 0) { return a + b; }


diff:
diff --git a/file116.js b/file116.js
@@ -1,1 +1,1 @@
-const result = x ? x : 10
+const result = x || 10;

comment: Use logical OR `||` for default values.


diff:
diff --git a/file117.js b/file117.js
@@ -1,1 +1,1 @@
-let obj = { a: a, b: b }
+let obj = { a, b };


diff:
diff --git a/file118.js b/file118.js
@@ -1,1 +1,1 @@
-if (!Array.isArray(items)) { return false }
+if (!Array.isArray(items)) return false;


diff:
diff --git a/file119.js b/file119.js
@@ -1,1 +1,1 @@
-var sum = 0;
arr.forEach(function(n) { sum += n; });
+const sum = arr.reduce((acc, n) => acc + n, 0);


diff:
diff --git a/file120.js b/file120.js
@@ -1,1 +1,1 @@
-var count = 0
+let count = 0


diff:
diff --git a/file122.js b/file122.js
@@ -1,1 +1,1 @@
-function greet(name) { return 'Hello ' + name }
+const greet = (name) => `Hello ${name}`;


diff:
diff --git a/file123.js b/file123.js
@@ -1,1 +1,1 @@
-console.log('Value: ' + value)
+console.log(`Value: ${value}`)


diff:
diff --git a/file124.js b/file124.js
@@ -1,1 +1,1 @@
-for (var i = 0; i < arr.length; i++) { doSomething(arr[i]); }
+for (const item of arr) { doSomething(item); }


diff:
diff --git a/file125.js b/file125.js
@@ -1,1 +1,1 @@
-function add(a, b) { return a + b }
+function add(a = 0, b = 0) { return a + b; }


diff:
diff --git a/file126.js b/file126.js
@@ -1,1 +1,1 @@
-const result = x ? x : 10
+const result = x || 10;

comment: Use logical OR `||` for default values.


diff:
diff --git a/file127.js b/file127.js
@@ -1,1 +1,1 @@
-let obj = { a: a, b: b }
+let obj = { a, b };


diff:
diff --git a/file128.js b/file128.js
@@ -1,1 +1,1 @@
-if (!Array.isArray(items)) { return false }
+if (!Array.isArray(items)) return false;


diff:
diff --git a/file129.js b/file129.js
@@ -1,1 +1,1 @@
-var sum = 0;
arr.forEach(function(n) { sum += n; });
+const sum = arr.reduce((acc, n) => acc + n, 0);


diff:
diff --git a/file130.js b/file130.js
@@ -1,1 +1,1 @@
-var count = 0
+let count = 0


diff:
diff --git a/file132.js b/file132.js
@@ -1,1 +1,1 @@
-function greet(name) { return 'Hello ' + name }
+const greet = (name) => `Hello ${name}`;


diff:
diff --git a/file133.js b/file133.js
@@ -1,1 +1,1 @@
-console.log('Value: ' + value)
+console.log(`Value: ${value}`)


diff:
diff --git a/file134.js b/file134.js
@@ -1,1 +1,1 @@
-for (var i = 0; i < arr.length; i++) { doSomething(arr[i]); }
+for (const item of arr) { doSomething(item); }


diff:
diff --git a/file135.js b/file135.js
@@ -1,1 +1,1 @@
-function add(a, b) { return a + b }
+function add(a = 0, b = 0) { return a + b; }


diff:
diff --git a/file136.js b/file136.js
@@ -1,1 +1,1 @@
-const result = x ? x : 10
+const result = x || 10;

comment: Use logical OR `||` for default values.


diff:
diff --git a/file137.js b/file137.js
@@ -1,1 +1,1 @@
-let obj = { a: a, b: b }
+let obj = { a, b };


diff:
diff --git a/file138.js b/file138.js
@@ -1,1 +1,1 @@
-if (!Array.isArray(items)) { return false }
+if (!Array.isArray(items)) return false;


diff:
diff --git a/file139.js b/file139.js
@@ -1,1 +1,1 @@
-var sum = 0;
arr.forEach(function(n) { sum += n; });
+const sum = arr.reduce((acc, n) => acc + n, 0);


diff:
diff --git a/file140.js b/file140.js
@@ -1,1 +1,1 @@
-var count = 0
+let count = 0


diff:
diff --git a/file142.js b/file142.js
@@ -1,1 +1,1 @@
-function greet(name) { return 'Hello ' + name }
+const greet = (name) => `Hello ${name}`;


diff:
diff --git a/file143.js b/file143.js
@@ -1,1 +1,1 @@
-console.log('Value: ' + value)
+console.log(`Value: ${value}`)


diff:
diff --git a/file144.js b/file144.js
@@ -1,1 +1,1 @@
-for (var i = 0; i < arr.length; i++) { doSomething(arr[i]); }
+for (const item of arr) { doSomething(item); }


diff:
diff --git a/file145.js b/file145.js
@@ -1,1 +1,1 @@
-function add(a, b) { return a + b }
+function add(a = 0, b = 0) { return a + b; }


diff:
diff --git a/file146.js b/file146.js
@@ -1,1 +1,1 @@
-const result = x ? x : 10
+const result = x || 10;

comment: Use logical OR `||` for default values.


diff:
diff --git a/file147.js b/file147.js
@@ -1,1 +1,1 @@
-let obj = { a: a, b: b }
+let obj = { a, b };


diff:
diff --git a/file148.js b/file148.js
@@ -1,1 +1,1 @@
-if (!Array.isArray(items)) { return false }
+if (!Array.isArray(items)) return false;


diff:
diff --git a/file149.js b/file149.js
@@ -1,1 +1,1 @@
-var sum = 0;
arr.forEach(function(n) { sum += n; });
+const sum = arr.reduce((acc, n) => acc + n, 0);


diff:
diff --git a/file150.js b/file150.js
@@ -1,1 +1,1 @@
-var count = 0
+let count = 0


diff:
diff --git a/file152.js b/file152.js
@@ -1,1 +1,1 @@
-function greet(name) { return 'Hello ' + name }
+const greet = (name) => `Hello ${name}`;


diff:
diff --git a/file153.js b/file153.js
@@ -1,1 +1,1 @@
-console.log('Value: ' + value)
+console.log(`Value: ${value}`)


diff:
diff --git a/file154.js b/file154.js
@@ -1,1 +1,1 @@
-for (var i = 0; i < arr.length; i++) { doSomething(arr[i]); }
+for (const item of arr) { doSomething(item); }


diff:
diff --git a/file155.js b/file155.js
@@ -1,1 +1,1 @@
-function add(a, b) { return a + b }
+function add(a = 0, b = 0) { return a + b; }


diff:
diff --git a/file156.js b/file156.js
@@ -1,1 +1,1 @@
-const result = x ? x : 10
+const result = x || 10;

comment: Use logical OR `||` for default values.


diff:
diff --git a/file157.js b/file157.js
@@ -1,1 +1,1 @@
-let obj = { a: a, b: b }
+let obj = { a, b };


diff:
diff --git a/file158.js b/file158.js
@@ -1,1 +1,1 @@
-if (!Array.isArray(items)) { return false }
+if (!Array.isArray(items)) return false;


diff:
diff --git a/file159.js b/file159.js
@@ -1,1 +1,1 @@
-var sum = 0;
arr.forEach(function(n) { sum += n; });
+const sum = arr.reduce((acc, n) => acc + n, 0);


diff:
diff --git a/file160.js b/file160.js
@@ -1,1 +1,1 @@
-var count = 0
+let count = 0


diff:
diff --git a/file162.js b/file162.js
@@ -1,1 +1,1 @@
-function greet(name) { return 'Hello ' + name }
+const greet = (name) => `Hello ${name}`;


diff:
diff --git a/file163.js b/file163.js
@@ -1,1 +1,1 @@
-console.log('Value: ' + value)
+console.log(`Value: ${value}`)


diff:
diff --git a/file164.js b/file164.js
@@ -1,1 +1,1 @@
-for (var i = 0; i < arr.length; i++) { doSomething(arr[i]); }
+for (const item of arr) { doSomething(item); }


diff:
diff --git a/file165.js b/file165.js
@@ -1,1 +1,1 @@
-function add(a, b) { return a + b }
+function add(a = 0, b = 0) { return a + b; }


diff:
diff --git a/file166.js b/file166.js
@@ -1,1 +1,1 @@
-const result = x ? x : 10
+const result = x || 10;

comment: Use logical OR `||` for default values.


diff:
diff --git a/file167.js b/file167.js
@@ -1,1 +1,1 @@
-let obj = { a: a, b: b }
+let obj = { a, b };


diff:
diff --git a/file168.js b/file168.js
@@ -1,1 +1,1 @@
-if (!Array.isArray(items)) { return false }
+if (!Array.isArray(items)) return false;


diff:
diff --git a/file169.js b/file169.js
@@ -1,1 +1,1 @@
-var sum = 0;
arr.forEach(function(n) { sum += n; });
+const sum = arr.reduce((acc, n) => acc + n, 0);


diff:
diff --git a/file170.js b/file170.js
@@ -1,1 +1,1 @@
-var count = 0
+let count = 0


diff:
diff --git a/file172.js b/file172.js
@@ -1,1 +1,1 @@
-function greet(name) { return 'Hello ' + name }
+const greet = (name) => `Hello ${name}`;


diff:
diff --git a/file173.js b/file173.js
@@ -1,1 +1,1 @@
-console.log('Value: ' + value)
+console.log(`Value: ${value}`)


diff:
diff --git a/file174.js b/file174.js
@@ -1,1 +1,1 @@
-for (var i = 0; i < arr.length; i++) { doSomething(arr[i]); }
+for (const item of arr) { doSomething(item); }


diff:
diff --git a/file175.js b/file175.js
@@ -1,1 +1,1 @@
-function add(a, b) { return a + b }
+function add(a = 0, b = 0) { return a + b; }


diff:
diff --git a/file176.js b/file176.js
@@ -1,1 +1,1 @@
-const result = x ? x : 10
+const result = x || 10;

comment: Use logical OR `||` for default values.


diff:
diff --git a/file177.js b/file177.js
@@ -1,1 +1,1 @@
-let obj = { a: a, b: b }
+let obj = { a, b };


diff:
diff --git a/file178.js b/file178.js
@@ -1,1 +1,1 @@
-if (!Array.isArray(items)) { return false }
+if (!Array.isArray(items)) return false;


diff:
diff --git a/file179.js b/file179.js
@@ -1,1 +1,1 @@
-var sum = 0;
arr.forEach(function(n) { sum += n; });
+const sum = arr.reduce((acc, n) => acc + n, 0);


diff:
diff --git a/file180.js b/file180.js
@@ -1,1 +1,1 @@
-var count = 0
+let count = 0


diff:
diff --git a/file182.js b/file182.js
@@ -1,1 +1,1 @@
-function greet(name) { return 'Hello ' + name }
+const greet = (name) => `Hello ${name}`;


diff:
diff --git a/file183.js b/file183.js
@@ -1,1 +1,1 @@
-console.log('Value: ' + value)
+console.log(`Value: ${value}`)


diff:
diff --git a/file184.js b/file184.js
@@ -1,1 +1,1 @@
-for (var i = 0; i < arr.length; i++) { doSomething(arr[i]); }
+for (const item of arr) { doSomething(item); }


diff:
diff --git a/file185.js b/file185.js
@@ -1,1 +1,1 @@
-function add(a, b) { return a + b }
+function add(a = 0, b = 0) { return a + b; }


diff:
diff --git a/file186.js b/file186.js
@@ -1,1 +1,1 @@
-const result = x ? x : 10
+const result = x || 10;

comment: Use logical OR `||` for default values.


diff:
diff --git a/file187.js b/file187.js
@@ -1,1 +1,1 @@
-let obj = { a: a, b: b }
+let obj = { a, b };


diff:
diff --git a/file188.js b/file188.js
@@ -1,1 +1,1 @@
-if (!Array.isArray(items)) { return false }
+if (!Array.isArray(items)) return false;


diff:
diff --git a/file189.js b/file189.js
@@ -1,1 +1,1 @@
-var sum = 0;
arr.forEach(function(n) { sum += n; });
+const sum = arr.reduce((acc, n) => acc + n, 0);


diff:
diff --git a/file190.js b/file190.js
@@ -1,1 +1,1 @@
-var count = 0
+let count = 0


diff:
diff --git a/file192.js b/file192.js
@@ -1,1 +1,1 @@
-function greet(name) { return 'Hello ' + name }
+const greet = (name) => `Hello ${name}`;


diff:
diff --git a/file193.js b/file193.js
@@ -1,1 +1,1 @@
-console.log('Value: ' + value)
+console.log(`Value: ${value}`)


diff:
diff --git a/file194.js b/file194.js
@@ -1,1 +1,1 @@
-for (var i = 0; i < arr.length; i++) { doSomething(arr[i]); }
+for (const item of arr) { doSomething(item); }


diff:
diff --git a/file195.js b/file195.js
@@ -1,1 +1,1 @@
-function add(a, b) { return a + b }
+function add(a = 0, b = 0) { return a + b; }


diff:
diff --git a/file196.js b/file196.js
@@ -1,1 +1,1 @@
-const result = x ? x : 10
+const result = x || 10;

comment: Use logical OR `||` for default values.


diff:
diff --git a/file197.js b/file197.js
@@ -1,1 +1,1 @@
-let obj = { a: a, b: b }
+let obj = { a, b };


diff:
diff --git a/file198.js b/file198.js
@@ -1,1 +1,1 @@
-if (!Array.isArray(items)) { return false }
+if (!Array.isArray(items)) return false;


diff:
diff --git a/file199.js b/file199.js
@@ -1,1 +1,1 @@
-var sum = 0;
arr.forEach(function(n) { sum += n; });
+const sum = arr.reduce((acc, n) => acc + n, 0);