Frontend
Interviews
.dev
Problems
685. RegExp.test Non-global lastIndex
Easy
•
...
Predict the output.
const
r
=
/
a
/
r
.
test
(
'a'
)
console
.
log
(
r
.
lastIndex
)
What is printed in the console?
0
1
-1
undefined
Submit Answer
Reveal Answer
Select an option and submit your answer.
Next Problem
Auto-advance on correct answer