You could e.g. use the filter array method to create a new array without the element 'hello'
:
messages = messages.filter(m => m !== 'hello');
You could e.g. use the filter array method to create a new array without the element 'hello'
:
messages = messages.filter(m => m !== 'hello');