What does this expression return?
/cat/.test('concatenate')
- true
- false
- null
- -1
Without anchors, a regex can match anywhere in the string, and
Play Regex ▸
cat appears inside "concatenate"./cat/.test('concatenate')
cat appears inside "concatenate".