I am a bit confuse about this code, the first and second matches return [“cat”] and [“bat”] but why the third match return null please help me!
Thank you.
let catStr = "cat";
let batStr = "bat";
let matStr = "mat";
let bgRegex = /[a-e]at/;
catStr.match(bgRegex);
batStr.match(bgRegex);
matStr.match(bgRegex);