Categories TypeScript Answers How to check whether an array contains a string in TypeScript? Post author By John Au-Yeung Post date September 15, 2022 No Comments on How to check whether an array contains a string in TypeScript? Spread the love To check whether an array contains a string in TypeScript, we call the includes method. For instance, we write console.log(channelArray.includes("three")); to check if the channelArray has 'three' in it with includes. Related Posts How to Check Whether a String Contains a Substring in JavaScript?Checking whether a string has another substring is a common operation we do in JavaScript… How to check for string equality with TypeScript?Sometimes, we want to check for string equality with TypeScript. In this article, we'll look… How to check for string equality with TypeScript?Sometimes, we want to check for string equality with TypeScript. In this article, we'll look… By John Au-Yeung Web developer specializing in React, Vue, and front end development. View Archive → ← How to get the index of the object inside an array, matching a condition with JavaScript? → How to get character array from a string with JavaScript? Leave a Reply Cancel replyYour email address will not be published. Required fields are marked *Comment * Name * Email * Website Save my name, email, and website in this browser for the next time I comment. Current ye@r * Leave this field empty