Pattern Question In Javascript