function reverseEachWordInString(s) {
let words = s.split(" ");
let reversedWords = words.map(word => word.split("").reverse().join(""));
return reversedWords.join(" ");
}
const s = "node.js c++ rust python c#";
console.log(reverseEachWordInString(s));
/*
run:
sj.edon ++c tsur nohtyp #c
*/