Contact: aviboots(AT)netvision.net.il
41,162 questions
53,654 answers
573 users
const s: string = 'typescript programming language'; let match_arr: any = s.match(/\b(\w)/g); let first_letters: string = match_arr.join(' '); console.log(first_letters); /* run: "t p l" */
const s: string = 'typescript programming language'; const firstLetters = s .split(" ") .map(word => word[0]) .join(" "); console.log(firstLetters); /* run: "t p l" */