I need to improve my Javascript code that handles different text options:
var personUrls = {
'amy': 'http://www.mydomain.com/amylikescats.html',
'dave': 'http://www.mydomain.com/daveshome.html',
'steve': 'http://www.mydomain.com/steve2.html',
'jake': 'http://www.mydomain.com/jakeeatstofu.html'
};
var url = personUrls[text] || 'http://www.mydomain.com/noone.html';
Do you have any suggestions for a more efficient approach?