The idea is to implement a new method called remove that receives a spinner reference name as argument and removes that spinner from the list, and thus should not be printed again in the terminal If no reference is given, the method call does nothing.
Example usage:
const spinnies = new Spinnies();
spinnies.add('spinner-1');
spinnies.add('spinner-2');
spinnies.add('spinner-3');
setTimeout(() => {
spinnies.remove('spinner-2');
}, 3000); // => should remove the second spinner and not print it again.
The idea is to implement a new method called
removethat receives a spinner reference name as argument and removes that spinner from the list, and thus should not be printed again in the terminal If no reference is given, the method call does nothing.Example usage: