TypeScript simplest way to check if item exists in array like C# Linq Any ( using any library ) -
typescript simplest way check if item exists in array c# linq ( using library ).
var myarray=[1,2,3,4]; var is_3_exist=myarray.any(x=> x==3);
use .some:
myarray.some(x=>x==3);
Comments
Post a Comment