
This will address instances where the project also uses. 10 users in db and 2 online users const users = [ ) įinally, you are happy? :) Just like and share also subscribe to newsletter. The types will tell the TypeScript compiler to only include type definitions from Cypress. We will compare the performance when using both Array.includes() and Set.has() to see the impact. the users array which represents all users exist in the database and the sessions array which stores online users ids. In this example, we will get user’s information who are online.

So using Set.has() in your codebase has a great impact on the performance which enhances the performance.

