Integer List To Array Methods In Js