Question: 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

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
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
