📅  最后修改于: 2022-03-11 14:48:34.353000             🧑  作者: Mango
function getMapValue(obj, key) {
if (obj.hasOwnProperty(key))
return obj[key];
throw new Error("Invalid map key.");
}