Add Value To End Of Array Javascript Length Validation