globalbeginnerconst re = /a/g
console.log(re.global) // β true
const re2 = /a/
console.log(re2.global) // β falseRead RegExp.global to check whether the 'g' flag is set on the regular expression.
The global property always returns a boolean value.
Challenge: Confirm that /pattern/g.global is strictly equal to true.