Answer:
var movie = {
name: "Avengers Endgame",
director: "Joe Russo",
composer: "Alan Silvestri",
cast: {
"Scarlett Johansson": "Black Widow",
"Chris Evans": "Captain America"
},
roleOf: function (name) {
if (typeof (this.cast[name]) !== 'undefined') {
return this.cast[name];
} else {
return "The actor is not part of this movie";
}
}
};
Explanation:
- Initialize the movie JSON (JavaScript Object Notation) having the name, director, composer and cast properties.
- Define a roleOf: function that has a name parameter.
- Check whether the selected is not equal to undefined and then return that name.
- Otherwise display this message: "The actor is not part of this movie".
Answer:
B) (x<=1)
Explanation:
Though this code given will run perfectly without any requirement of base case.But still we have to include a base case I will suggest (x<=1) because the value of x is decreased by one at each recursive call so it can handle it very well and it can handle negative values of x also if user enters it by mistake since factorial is for positive numbers only.
Answer:
B
Explanation:
Typically I check the physical layer to ensure that the nodes are plugged accordingly.
Answer:
Size
Explanation:
Connectivity, they need internet to work.
Speed, they need it to work fast.
Storage, they need space to work.
Size, isn't all that important, unlike the rest.