Java Integer Array Methods Javascript Questions