Two uses of concat method when working with arrays in JavaScript