Im trying to get the character after my string, I am using the bellow code but it dose not seem to work.
Input value: fileinput-1
Expected result: 1
Any ideas. This is my code:
str = element.id;
str.substr(str.indexOf('-') + 1);
console.log(str);
index = str;