Is there any difference in memory allocation here? And why is even " * " necessary?

let chewieQuote = "Aaaaaaaaaaaaaraaarrrgh!";

let chewieRegex = /a*/gi; // Change this line

let result = chewieQuote.match(chewieRegex);

console.log(result); // Result is (Aaaaaaaaaaaaa,,aaa,,,,,,,)

and in second case,

let chewieQuote = "Aaaaaaaaaaaaaraaarrrgh!";

let chewieRegex = /a+/gi; // Change this line

let result = chewieQuote.match(chewieRegex);

console.log(result); //Result is(Aaaaaaaaaaaaa,aaa)

a* will mactch any string that contains zero or more "a"s. (In other words, it will match anything)
a+ will match a string that contains at least one “a”.