Beautiful! findIndex() is super powerful.
1
31
124
0
17
Download Image
@JavaScript Another powerful use of findIndex(): const a = [2, 8, 73 /*,…*/]; const s = 55; if (1 + findIndex(x=>x==s)) { console.log("a contains s"); };
@JavaScript 1st Dr.V.Chandrasekar BCA., MCA., Mphil/ Phd Computer Sciences ., Pursuing., Computer Subject:Java and Javascript Program . (100/100).Programmer., Software Engineer. Cell number:9360949895. E-mail:[email protected] 🙂 Freelaunzer 🇮🇳🥘🍲.