JS Built-ins
RegExpmultilinebeginner

RegExp multiline β€” typeof

πŸ“– Usage Example
const re = /^start/m
console.log(re.multiline) // β†’ true
// ^ and $ match at line boundaries

Read RegExp.multiline to check whether the 'm' flag is set on the regular expression.

RegExp.prototype.multiline

The multiline property always returns a boolean.

Challenge: Verify that typeof /hi/m.multiline is 'boolean'.

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