Tell us what’s happening:
Describe your issue in detail here.
Your code so far
let quoteSample = "The quick brown fox jumps over the lazy dog.";
let alphabetRegex = /[a-z]/ig; // Change this line
let result = quoteSample.match(alphabetRegex); // Change this line
The above code completes the challenge. But when I test it on Chrome console it says ‘result’ has already been declared. For the code to work on Chrome console, I have to remove ‘let result =’ for the console to deliver the intended results.
Why is this???
So code ends up looking as follows
let quoteSample = "The quick brown fox jumps over the lazy dog.";
let alphabetRegex = /[a-z]/ig; // Change this line
quoteSample.match(alphabetRegex); // Change this line
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36
Challenge: Match Letters of the Alphabet
Link to the challenge: