https://www.codeguru.co.in/2008/03/how-to-fill-javascript-array-from.html