cleanArray¶
Overview¶
If given an Array, removes all of its elements and returns it. Otherwise, if given a falsy value (null/undefined/etc.), it will create and return a fresh Array.
@author Jonathan Olson <jonathan.olson@colorado.edu>
Source Code¶
See the source for cleanArray.ts in the phet-core repository.