JavaScript | Regular Expressions JSON | Question 6

Last Updated :
Discuss
Comments

What will the following code log?

JavaScript
const regex = /a+b*/;
console.log(regex.test("aaabb"));


true

false

null

Error

Share your thoughts in the comments