How to find the index of the last occurrence of a character in a string with TypeScript

1 Answer

0 votes
const str = 'javascript c typescript node.js';

const index = str.lastIndexOf('j');

console.log(index);




/*
run:
 
29
  
*/

 



answered Jun 7, 2022 by avibootz
...