I want that it prints "S&P" in the console. Why does it not work?
var agency = "s_p"
function switch_Name(agency) {
const agencies = {s_p: "S&P", moody: "Moodys", fitch: "Fitch"};
console.log(agencies.agency);
};
switch_Name();
I want that it prints "S&P" in the console. Why does it not work?
var agency = "s_p"
function switch_Name(agency) {
const agencies = {s_p: "S&P", moody: "Moodys", fitch: "Fitch"};
console.log(agencies.agency);
};
switch_Name();