The square bracket is not typed, the {} object gets converted into a string representation which is [object Object]. These square brackets then have regex meaning, match anything inside of them. The o matches Mom, there is nothing in the brackets that match Dad.
View all comments
Show parent comment
837
u/Confident-Ad5665 Mar 20 '24
If you're English you should know it doesn't work with "mum"