clear method
void
clear()
removes all elements from the stack
Implementation
void clear() {
while (isNotEmpty) {
_list.removeLast();
}
}
removes all elements from the stack
void clear() {
while (isNotEmpty) {
_list.removeLast();
}
}