Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 13 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ can help identify unnamed constants.
```javascript
// What the heck is 86400000 for?
setTimeout(() => {
this.blastOff()
this.blastOff();
}, 86400000);

```
Expand All @@ -92,7 +92,7 @@ setTimeout(() => {
const MILLISECONDS_IN_A_DAY = 86400000;

setTimeout(() => {
this.blastOff()
this.blastOff();
}, MILLISECONDS_IN_A_DAY);

```
Expand Down Expand Up @@ -183,15 +183,15 @@ function paintCar(car) {
```javascript
function createMicrobrewery(name) {
const breweryName = name || 'Hipster Brew Co.';
...
// ...
}

```

**Good**:
```javascript
function createMicrobrewery(breweryName = 'Hipster Brew Co.') {
...
// ...
}

```
Expand Down Expand Up @@ -382,9 +382,9 @@ function showDeveloperList(developers) {
const experience = developer.getExperience();
const githubLink = developer.getGithubLink();
const data = {
expectedSalary: expectedSalary,
experience: experience,
githubLink: githubLink
expectedSalary,
experience,
githubLink
};

render(data);
Expand All @@ -397,9 +397,9 @@ function showManagerList(managers) {
const experience = manager.getExperience();
const portfolio = manager.getMBAProjects();
const data = {
expectedSalary: expectedSalary,
experience: experience,
portfolio: portfolio
expectedSalary,
experience,
portfolio
};

render(data);
Expand All @@ -421,9 +421,9 @@ function showList(employees) {
}

const data = {
expectedSalary: expectedSalary,
experience: experience,
portfolio: portfolio
expectedSalary,
experience,
portfolio
};

render(data);
Expand All @@ -448,7 +448,6 @@ function createMenu(config) {
config.body = config.body || 'Bar';
config.buttonText = config.buttonText || 'Baz';
config.cancellable = config.cancellable === undefined ? config.cancellable : true;

}

createMenu(menuConfig);
Expand Down Expand Up @@ -585,10 +584,6 @@ Array.prototype.diff = function diff(comparisonArray) {
**Good:**
```javascript
class SuperArray extends Array {
constructor(...args) {
super(...args);
}

diff(comparisonArray) {
const values = [];
const hash = {};
Expand Down Expand Up @@ -1124,10 +1119,6 @@ class Rectangle {
}

class Square extends Rectangle {
constructor() {
super();
}

setWidth(width) {
this.width = width;
this.height = width;
Expand Down Expand Up @@ -1155,8 +1146,6 @@ renderLargeRectangles(rectangles);
**Good**:
```javascript
class Shape {
constructor() {}

setColor(color) {
// ...
}
Expand Down Expand Up @@ -1607,7 +1596,6 @@ class Employee {
constructor(name, email) {
this.name = name;
this.email = email;

}

setTaxData(ssn, salary) {
Expand Down