Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fixed few examples #64

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 11, 2017
Merged

Conversation

HemantPawar
Copy link
Contributor

Fixed few lines by adding missing semicolons.

@vsemozhetbyt
Copy link
Contributor

It seems there are some more on these lines:

123

const match = cityStateRegex.match(cityStateRegex) // < HERE

209

  var breweryName = name || 'Hipster Brew Co.' // < HERE

245

var menuConfig = {
  title: 'Foo',
  body: 'Bar',
  buttonText: 'Baz',
  cancellable: true
} // < HERE

482

var menuConfig = {
  title: null,
  body: 'Bar',
  buttonText: null,
  cancellable: true
} // < HERE

502

var menuConfig = {
  title: 'Order',
  // User did not include 'body' key
  buttonText: 'Send',
  cancellable: true
} // < HERE

584

var name = 'Ryan McDermott' // < HERE

982

var Employee = function(name) {
  this.name = name;
} // < HERE

986

Employee.prototype.getName = function() {
  return this.name;
} // < HERE

1735 + 1737

require('request').get('https://en.wikipedia.org/wiki/Robert_Cecil_Martin', function(err, response) {
  if (err) {
    console.error(err);
  }
  else {
    require('fs').writeFile('article.html', response.body, function(err) {
      if (err) {
        console.error(err);
      } else {
        console.log('File written');
      }
    }) // < HERE
  }
}) // < HERE

1752

require('request-promise').get('https://en.wikipedia.org/wiki/Robert_Cecil_Martin')
  .then(function(response) {
    return require('fs-promise').writeFile('article.html', response);
  })
  .then(function() {
    console.log('File written');
  })
  .catch(function(err) {
    console.error(err);
  }) // < HERE

1775

require('request-promise').get('https://en.wikipedia.org/wiki/Robert_Cecil_Martin')
  .then(function(response) {
    return require('fs-promise').writeFile('article.html', response);
  })
  .then(function() {
    console.log('File written');
  })
  .catch(function(err) {
    console.error(err);
  }) // < HERE

1783

    var request = await require('request-promise') // < HERE

2107

let actions = function() {
  // ...
} // < HERE

2119

let actions = function() {
  // ...
} // < HERE

@HemantPawar
Copy link
Contributor Author

@vsemozhetbyt Great catch!!! I have added above changes.

@ryanmcdermott
Copy link
Owner

Awesome finds! Can you rebase this with master and resolve conflicts? There was a large change after #51 which has affected this branch a little bit. Thank you!

@HemantPawar
Copy link
Contributor Author

@ryanmcdermott done :)

@vsemozhetbyt
Copy link
Contributor

@HemantPawar Just found one more :) Line 597:

Array.prototype.diff = function(comparisonArray) {
  const values = [];
  const hash = {};

  for (let i of comparisonArray) {
    hash[i] = true;
  }

  for (let i of this) {
    if (!hash[i]) {
      values.push(i);
    }
  }

  return values;
} // < HERE

@vsemozhetbyt
Copy link
Contributor

And the line 1514:

car.setModel('F-150') // < HERE

@HemantPawar
Copy link
Contributor Author

Thanks @vsemozhetbyt :)

@HemantPawar
Copy link
Contributor Author

@ryanmcdermott resolved conflicts

@ryanmcdermott ryanmcdermott merged commit 383dd49 into ryanmcdermott:master Jan 11, 2017
@ryanmcdermott
Copy link
Owner

Thanks Hemant! While these changes may feel small, they go such a long way to improving the readability of this project 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants