Replace Array With New Array Javascript Length Of String