Question: Help with javaScript NOTE: Use proper ES6 syntax including using let/const, strict equals, no global variables, etc. Use proper indentation and formatting . Do NOT
Help with javaScript
NOTE:
- Use proper ES6 syntax including using let/const, strict equals, no global variables, etc. Use proper indentation and formatting.Do NOT use Regex.
1) Write a function called LocateandReplace.
- This function accepts three arguments which are all strings and the function returns a string.
- The function uses the first argument to find a character in the given string phrase and replace it with the character given as the second argument.
- Finally, it then returns the string phrase with the character properly replaced. The replace should be case-sensitive.
Like:
function LocateandReplace( str1, str2, str3 ){
return str;
}
console.log(LocateandReplace('/', 'a', ' J / v / script '));
EXPECTED OUTPUT (string): 'Javascript'
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
