const clubs = { cr7: ['mu', 'juve'], ibrahimovic: ['AC Milan', 'InterMilan'], Bale: ['Tottenham', 'Roma'] } function test(player) { return clubs[player] || []; } console.log('result 3--', test('Bale')); // "result 3--", ["Tottenham", "Roma"]
const clubs = { cr7: ['mu', 'juve'], ibrahimovic: ['AC Milan', 'InterMilan'], Bale: ['Tottenham', 'Roma'] } function test(player) { return clubs[player] || []; } console.log('result 3--', test('Bale')); // "result 3--", ["Tottenham", "Roma"]