@@ -583,11 +583,11 @@ Array..diff = function(comparisonArray) {
|
583 | 583 | const values = [];
|
584 | 584 | const hash = {};
|
585 | 585 |
|
586 |
| -for (let i of comparisonArray) { |
| 586 | +for (const i of comparisonArray) { |
587 | 587 | hash[i] = true;
|
588 | 588 | }
|
589 | 589 |
|
590 |
| -for (let i of this) { |
| 590 | +for (const i of this) { |
591 | 591 | if (!hash[i]) {
|
592 | 592 | values.push(i);
|
593 | 593 | }
|
@@ -608,11 +608,11 @@ class SuperArray extends Array {
|
608 | 608 | const values = [];
|
609 | 609 | const hash = {};
|
610 | 610 |
|
611 |
| -for (let i of comparisonArray) { |
| 611 | +for (const i of comparisonArray) { |
612 | 612 | hash[i] = true;
|
613 | 613 | }
|
614 | 614 |
|
615 |
| -for (let i of this) { |
| 615 | +for (const i of this) { |
616 | 616 | if (!hash[i]) {
|
617 | 617 | values.push(i);
|
618 | 618 | }
|
@@ -1150,12 +1150,12 @@ function renderLargeRectangles(rectangles) {
|
1150 | 1150 | rectangles.forEach((rectangle) => {
|
1151 | 1151 | rectangle.setWidth(4);
|
1152 | 1152 | rectangle.setHeight(5);
|
1153 |
| -let area = rectangle.getArea(); // BAD: Will return 25 for Square. Should be 20. |
| 1153 | +const area = rectangle.getArea(); // BAD: Will return 25 for Square. Should be 20. |
1154 | 1154 | rectangle.render(area);
|
1155 | 1155 | })
|
1156 | 1156 | }
|
1157 | 1157 |
|
1158 |
| -let rectangles = [new Rectangle(), new Rectangle(), new Square()]; |
| 1158 | +const rectangles = [new Rectangle(), new Rectangle(), new Square()]; |
1159 | 1159 | renderLargeRectangles(rectangles);
|
1160 | 1160 | ```
|
1161 | 1161 |
|
@@ -1932,7 +1932,7 @@ class PerformanceReview {
|
1932 | 1932 | }
|
1933 | 1933 | }
|
1934 | 1934 |
|
1935 |
| -let review = new PerformanceReview(user); |
| 1935 | +const review = new PerformanceReview(user); |
1936 | 1936 | review.perfReview();
|
1937 | 1937 | ```
|
1938 | 1938 |
|
@@ -1971,7 +1971,7 @@ class PerformanceReview {
|
1971 | 1971 | }
|
1972 | 1972 | }
|
1973 | 1973 |
|
1974 |
| -let review = new PerformanceReview(employee); |
| 1974 | +const review = new PerformanceReview(employee); |
1975 | 1975 | review.perfReview();
|
1976 | 1976 | ```
|
1977 | 1977 |
|
@@ -2072,7 +2072,7 @@ proper indentation and formatting give the visual structure to your code.
|
2072 | 2072 | ////////////////////////////////////////////////////////////////////////////////
|
2073 | 2073 | // Scope Model Instantiation
|
2074 | 2074 | ////////////////////////////////////////////////////////////////////////////////
|
2075 |
| -const $scope.model = { |
| 2075 | +$scope.model = { |
2076 | 2076 | menu: 'foo',
|
2077 | 2077 | nav: 'bar'
|
2078 | 2078 | };
|
@@ -2087,7 +2087,7 @@ const actions = function() {
|
2087 | 2087 |
|
2088 | 2088 | **Good**:
|
2089 | 2089 | ```javascript
|
2090 |
| -const $scope.model = { |
| 2090 | +$scope.model = { |
2091 | 2091 | menu: 'foo',
|
2092 | 2092 | nav: 'bar'
|
2093 | 2093 | };
|
|
0 commit comments