Skip to content

Instantly share code, notes, and snippets.

@lelouchB
Last active October 2, 2019 03:18
Show Gist options
  • Save lelouchB/8c912e8097efb5d78e40884e04317f35 to your computer and use it in GitHub Desktop.
Save lelouchB/8c912e8097efb5d78e40884e04317f35 to your computer and use it in GitHub Desktop.
class Movies {
constructor(name, releaseYear, genre, ratings) {
this.name = name;
this.releaseYear = releaseYear;
this.genre = genre;
this.ratings = ratings;
}
watch() {
console.log("Watch Online");
}
}
let rocky = new Movies("Rocky", 1976, ["Drama", "Sports"], {
IMDb: "8.1 / 10",
Metacritic: "70%"
});
console.log(rocky);
// Movies {
// name: 'Rocky',
// releaseYear: 1976,
// genre: ['Drama', 'Sports'],
// ratings: { IMDb: '8.1 / 10', Metacritic: '70%' }
// }
rocky.watch();
//Watch Online
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment