JS Built-ins
RegExpignoreCasebeginner

RegExp ignoreCase β€” typeof

πŸ“– Usage Example
const re = /hello/i
console.log(re.ignoreCase) // β†’ true
'HELLO'.match(re) // matches

Read RegExp.ignoreCase to check whether the 'i' flag is set on the regular expression.

RegExp.prototype.ignoreCase

The ignoreCase property always returns a boolean.

Challenge: Verify that typeof /hi/i.ignoreCase is 'boolean'.

πŸ’‘ Hints (1)
  • β€’ ignoreCase is always a boolean value