For this Question: Given a string, reverse each word in the sentenceA string containing multiple words

ex:- "Welcome to this Javascript Guide!"A string with all words reversed
ex:- "emocleW ot siht tpircsavaJ !ediuG"Sample input:-
"Welcome to this Javascript Guide!"

Sample output:-
"emocleW ot siht tpircsavaJ !ediuG"

Explanation:-
The first word is reversed from "Welcome" to "emocleW"
and similarly all other wrods are reversed but the order of the words is same, I have written this Solution Code:   function reverseBySeparator(string, separator) {
    return string.split(separator).reverse().join(separator);
    }
function reverseWords (str){
  const step1 = reverseBySeparator(str,"")
  const step2 = reverseBySeparator(step1," ")
  console.log(step2)
}
, In this Programming Language: JavaScript, Now tell me if this Code is compilable or not?