Match Letters of the Alphabet1

Match Letters of the Alphabet1
0

#1

Tell us what’s happening:
What am I going wrong?

Your code so far


let quoteSample = "The quick brown fox jumps over the lazy dog.";
let alphabetRegex = /[a-z]/gi; // Change this line
let result = quoteSample.match(alphabetRegex).length; // Change this line

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/regular-expressions/match-letters-of-the-alphabet


#2

Why did you add .length to then end? That assigns a number to result instead of the array of matches which the challenge is wanting.


#3

OHh yes I should delete .length right?


#4

Try it and see for yourself.


#5

Yes I delete it and I passed the test.Thank yoou very much!