Task: Remove First and Last Slash from Strings in JavaScript
Task: Remove First and Last Slash from Strings in JavaScript: a task in Terminal-Lego-15k (Harbor dataset). Write a JavaScript solution that removes the leading and trailing forward slashes ( / ) from strings, if they exist. The solution should handle cases where:
The task
Write a JavaScript solution that removes the leading and trailing forward slashes (`/`) from strings, if they exist. The solution should handle cases where:
Part of PrimeIntellect/Terminal-Lego-15k.