Array Implementation In Javascript