JavaScript object and string homework