sudheerj / javascript-interview-questions

List of 1000 JavaScript Interview Questions
24.33k stars 6.92k forks source link

#347 Error #257

Closed DmitriyMalayev closed 6 months ago

DmitriyMalayev commented 6 months ago

Hi, Thanks for the amazing guide. There is a syntax error on question # 347

let regexp = /Hello(\d?))/g; //extra ) let greeting = "Hello1Hello2Hello3";

let greetingList = [...greeting.matchAll(regexp)];

console.log(greetingList[0]); //Hello1 console.log(greetingList[1]); //Hello2 console.log(greetingList[2]); //Hello3

sudheerj commented 6 months ago

@DmitriyMalayev Thanks for pointing out. Fixed.