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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!