added array js and wrote "first" array utility function