Array Programming Questions In Javascript