QUESTION IMAGE
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
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");Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
let cast = new Map();
cast.set("Anne Hathaway", "Brand");