Frontend
Interviews
.dev
Problems
639. RegExp global lastIndex State
Easy
•
...
Predict the output.
const
r
=
/
a
/
g
console
.
log
(
r
.
test
(
'a'
)
,
r
.
test
(
'a'
)
)
What is the correct output/behavior?
true true
true false
false true
false false
Submit Answer
Reveal Answer
Select an option and submit your answer.
Next Problem
Auto-advance on correct answer