Simple Function Program In Javascript Object Array