I am actually new to javascript and I'm trying to understand what went wrong with this code.
I have a function that accepts a abc
as a parameter.
This regular expression was given to me by one of my colleges. I don't have any idea what it's doing. Just wanted to understand what is the return statement here.
(function(abc) {
var match = abc.match(/(\d+).+?(\d+)/);
return +match[2] + 1;
});
I think the match will contain digits in decimal format but not clear about it. what will this return? Please let me understand this, will be a great help.