Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

add \anne hathaway\ to the cast as the key, with value \brand\. 1 let c…

Question

add \anne hathaway\ to the cast as the key, with value \brand\.
1 let cast = new map();
2
3 / your solution goes here /
4

Explanation:

Step1: Use the set method of Map

The set method of a Map object is used to add or update an entry in the map. The syntax is map.set(key, value). In this case, the key is "Anne Hathaway" and the value is "Brand".

cast.set("Anne Hathaway", "Brand");

Answer:

let cast = new Map();
cast.set("Anne Hathaway", "Brand");