I'm trying to use two RegEx.test() methods with Logical AND in a conditional block, however, not getting expected result.
const mobileRegEx = /[0][4-5][0-9]{8}/g;
const firstPhone = '0432779680';
const secondPhone = '0543000987';
if(mobileRegEx.test(firstPhone) && mobileRegEx.test(secondPhone)){
console.log(firstPhone, secondPhone); /* expecting this to be executed but it is not */
}