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

Popular posts from this blog

php - Admin SDK -- get information about the group -

ruby on rails - one-to-many through referance table -

python - Pygame screen.blit not working -