Define a method named orderOfAppearance() that takes the name of a role as an argument and returns that role's order of appearance. You may access the object's properties using the keyword this. Ex: this.title accesses the object's title property.
// Code will be tested with different roles and movies
let movie = {
title: "The Lord of the Rings: The Fellowship of the Ring",
director: "Peter Jackson",
composer: "Howard Shore",
roles: [ // Roles are stored in order of appearance
"Frodo Baggins",
"Samwise Gamgee",
"Gandalf",
"Aragorn",
"Legolas",
"Saruman"
],
orderOfAppearance: function(role) {
/* Your solution goes here */
}
};