JS Built-ins
RegExpignoreCasebeginner

RegExp ignoreCase β€” result is boolean

πŸ“– 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

Confirm that ignoreCase is strictly a boolean.

Challenge: Verify that /pattern/i.ignoreCase === true.

πŸ’‘ Hints (1)
  • β€’ ignoreCase returns a strict boolean, not just a truthy/falsy value