javascript if pattern is true code example Example: js match true false /match/.test('string match') // true