Menu

(Solved) : Write Function Javascript Receive String Parameter Perform Following Don T Prompt String S Q43914842 . . .

Write a function in JavaScript that will receive a string as a parameter and then perform the following: • You dont have to

Write a function in JavaScript that will receive a string as a parameter and then perform the following: • You don’t have to prompt for a string. Simply assign a string to a variable in your code as your starting point to use as an argument for your function. If the first and last characters of the string are the same (ignoring case), the function will return the string in reverse order. Otherwise, the function will return the string with the first and last letters removed. • Example: “Triscuit” returns “tiucsirT” but “Cracker” returns “racke”. Show transcribed image text Write a function in JavaScript that will receive a string as a parameter and then perform the following: • You don’t have to prompt for a string. Simply assign a string to a variable in your code as your starting point to use as an argument for your function. If the first and last characters of the string are the same (ignoring case), the function will return the string in reverse order. Otherwise, the function will return the string with the first and last letters removed. • Example: “Triscuit” returns “tiucsirT” but “Cracker” returns “racke”.

Expert Answer


Answer to Write a function in JavaScript that will receive a string as a parameter and then perform the following: • You don’t h…

OR