So I've read a lot of posts and documentation on the + operator for JS regex, but I'm still unsure of what it wouldo do.
For example, one of the websites I looked after gave the following example:
const nums = /\d+/
console.log(nums.test('456'))
Says it would look for infinite possibilites for d. But then...
const nums = /\d/
console.log(nums.test('456'))
... has the same result.
So I tried using numbers... for instance:
const nums2 = /45/
const nums 3 = /45+/
console.log(....
But testing both regex would STILL give the same result. If I put any numbers before or after 45 with or without the + it will still give me a "true" if 45 is togheter.
So can someone explain what the + symbol in regex means and it's usage in a way I can understand?