function reverseEachWordInString(s: string) {
let words: string[] = s.split(" ");
let reversedWords: string[] = words.map(word => word.split("").reverse().join(""));
return reversedWords.join(" ");
}
const s: string = "typescript c++ rust python c#";
console.log(reverseEachWordInString(s));
/*
run:
"tpircsepyt ++c tsur nohtyp #c"
*/