Tell us what’s happening:
Usually, such code logs all characters that matches.
But here it’s logged number of characters instead of characters on console.
Why…?
Your code so far
let quoteSample = "The five boxing wizards jump quickly.";
let alphabetRegexV2 = /\w/gi; // Change this line
let result = quoteSample.match(alphabetRegexV2).length;
console.log(result)
var man = "Man is vary good";
let nam = /[a]/ig;
let damn = man.match(nam);
console.log(damn);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/regular-expressions/match-all-letters-and-numbers