jverce

numChars

Aug 24th, 2020
2,326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const numChars = (s, c) => [...s].filter(sChar => sChar === c).length;
Advertisement
Add Comment
Please, Sign In to add comment