Powershell While Loop Array Javascript Mdn