There is a list a=["a","a","b"] i want to remove "a" from the list but
Hi team, There is a list a=["a","a","b"] i want to remove "a" from the list but when i use . remove it removes only the first "a" how can i remove all a's from the list
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Rajanikant HawaldarPosted Mar 25, 2021, 6:29 AM
Jaimin ShethiyaPosted Mar 25, 2021, 5:40 AM
can you please tried the below statement and checked.
var a=["a","a","b"];
a.filter(function (s) { return s != "a" });
Thanks