The syntax for this would be
var table = { mykey: myproperty, mykey2: myproperty2 };
If you want your variable to be an object, you can access the properties by calling fe table.avengers , your declaration should look like this:
var table = { avengers: new Media("avengers",'../assets/boxcovers/avengers.jpg'), blade_runner: new Media("blade_runner",'../assets/boxcovers/blade_runner.jpg'), brave: new Media("brave",'../assets/boxcovers/brave.jpg')
If you want them to be able to scroll through them, you can create it as an array:
var table = [ new Media("avengers",'../assets/boxcovers/avengers.jpg'), new Media("blade_runner",'../assets/boxcovers/blade_runner.jpg'), new Media("brave",'../assets/boxcovers/brave.jpg')
source share