Powershell While Loop Array Javascript Methods Mdn