Skip to content

Instantly share code, notes, and snippets.

@mannuelf
Created January 1, 2017 21:28
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save mannuelf/7b240f8ae232fec3ab8218260d1e32da to your computer and use it in GitHub Desktop.
function Car(model) {
this.model = model;
}
var cars = [
new Car('Ferrari'),
new Car('McLaren'),
new Car('Porsche')
];
cars.find(function(car) {
return car.model === 'McLaren';
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment