I don\'t understand why I get an error message using the substring method to declare a variable.
I want to use the first part of the URL in a comparison.
Sit
You can use substr
substr
for example:
new Date().getFullYear().toString().substr(-2)