RegExp.prototype.test
2022年5月1日小于 1 分钟
RegExp.prototype.test
Question
What does the code snippet to the right output by console.log
?
Snippet
console.log(/^4\d\d$/.test('404'))
console.log(/^4\d\d$/.test(404))
console.log(/^4\d\d$/.test(['404']))
console.log(/^4\d\d$/.test([404]))