Powershell While Loop Array Javascript Mdn Math