79163060

Date: 2024-11-06 14:38:20
Score: 1.5
Natty:
Report link

Here is one line code:

const removePaths = (url, numsPathToRemove) => url.replace(/\/+$/, "").split("/").slice(0, -numsPathToRemove).join("/");
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: ABDULLAH SH