Skip to content

Instantly share code, notes, and snippets.

@lelouchB
Created September 29, 2019 04:28
Show Gist options
  • Save lelouchB/83da88485cab6f437e9bea7e75761011 to your computer and use it in GitHub Desktop.
Save lelouchB/83da88485cab6f437e9bea7e75761011 to your computer and use it in GitHub Desktop.
let movies = new Object();
console.log(movies)
//{}
movies.name = "Dead Poets Society";
movies.releaseYear = 1989;
movies.genre = ["Drama", "Teen"];
movies.ratings = {
IMDb: "8.1 / 10",
Metacritic: "79%"
};
movies.watch = () => {
console.log("Watch Online");
};
console.log(movies);
// { name: 'Dead Poets Society',
// releaseYear: 1989,
// genre: [ 'Drama', 'Teen' ],
// ratings: { IMDb: '8.1 / 10', Metacritic: '79%' },
// watch: [Function] }
movies.watch();
// Watch Online
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment