0

In project I define an empty array var reply= []; and in a portion of code and conditions I had o reset it to its origin as an empty array. any one can help how to do this instead of using pop method.?

RSA
  • 1,335
  • 4
  • 19
  • 34

2 Answers2

4

some times tiny questions are looking so big.
try:

reply = [];
Parsaria
  • 909
  • 2
  • 11
  • 17
4

You have to set length of an array to zero or use splice.

setting it to [] will create a new array.

user458236
  • 171
  • 2
  • 7