Search the string

Report a typo

What is the output of the following program?

let text = "I am Even: 2, 4, 6, 8, 10";
let str1 = /\d+/;
let str2 = /\s+/;

console.log(text.search(str1), text.search(str2));
Select one option from the list
___

Create a free account to access the full topic