Skip to content

cleanArray

Under Construction

This documentation is auto-generated, and is a work in progress. Please see the source code at https://github.com/phetsims/phet-core/blob/main/js/cleanArray.ts for the most up-to-date information.

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.