Ignore Case While Matching

Tell us what’s happening:
never mind

Your code so far

let myString = "freeCodeCamp";
let fccRegex = /FreeCodeCamp freeCodeCamp/; // Change this line
let result = fccRegex.test(myString);

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/ignore-case-while-matching

1 Like

Yeah this is no help at all …
like from what it seems the challenge is pretty easy to do,
just include the /i after the string however… something is broken.

Your code so far


let myString = "freeCodecamp";
let fccRegex = /myString/i; 
let result = fccRegex.test(myString);

Your browser information:

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

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/regular-expressions/ignore-case-while-matching/

Instead of using “myString” for the Regex try using “freeCodeCamp”. That’ll give you the solution you’re looking for.

by the way, this line of code will pass the tests:

let fccRegex = /eC/;