Hi, how do I check if array contains a char? I have a string that I want to loop through (it's characters) and check whether an array has any of those characters const fruit = 'Banana'
const letters = ['A', 'B', 'C', N'];const fruit = 'Banana'
const letters = ['A', 'B', 'C', N'];
I want to check every characters of Banana to see if it's found in letters array. If it's found i just want to increment an integer, if it's not, I just want to continue; to next iteration.
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community
R
Reactiflux
The largest chat community for React professionals