I am not so into JavaScript and I have the following problem.
I have a string like this:
https://smart.XXX.it/default.asp/s4
into a var
You could use String.replace:
String.replace
const url = 'https://smart.XXX.it/default.asp/s4'.replace('/default.asp', ''); console.log(url);