clear method

dynamic clear()

Implementation

clear() {
  return this.nodes = [];
}