Remove Hello from array Javascript Program with source code

const strings=['Hi','Hello','X','Y'];
for(let i=0;i<strings.length;i++)
{
    if(strings[i]=='Hello')
    {
        strings.splice(i,1);
        break;
    }
}
console.log(strings);

Check Also

How to debugg our flutter application

Debugging a Flutter application involves a variety of techniques and tools to identify and fix …

Leave a Reply

Your email address will not be published. Required fields are marked *