in , , , , ,

areJSDevsActuallySane

areJSDevsActuallySane | javascript-memes, java-memes, test-memes, node-memes, devs-memes, regex-memes, object-memes, js-memes, ML-memes, console-memes | ProgrammerHumor.io
javascript-memes, java-memes, test-memes, node-memes, devs-memes, regex-memes, object-memes, js-memes, ML-memes, console-memes | ProgrammerHumor.io

Content

Post Eloff eloffd 18h Oh JavaScript… Can someone explain this one to me? index.js X 1 console. log (new RegExp (). test ( ‘mom’)) ; 2 console. log (new RegExp () . test (‘dad")) true false Default: node index.js X 151 17 214 1.8K th 378K " I t7 Sean Baxter reposted reluctant dwarf WillIAmLegend If someone wants a serious answer: 1. O gets converted to ‘(object Object’ by JS 2. square brackets means "match any single character within the brackets" 3. "mom" matches the "o", but "dad" doesn’t match any of the characters in "obiect Obiect" 2:23 AM Mar 20, 2024 19.7K Views 20 1734 1.1K 65