Powershell Push To Array Javascript Length Validation Vs Invalidation