MCQs > IT & Programming > PHP > What is the value of 'n1' and 'n2' after executing the following code? var str = 'Finding foo in Foo and Bar'; var n1 = str.search('Foo'); var n2 = str.search(/Foo/i);

PHP MCQs

What is the value of "n1" and "n2" after executing the following code? var str = "Finding foo in Foo and Bar"; var n1 = str.search("Foo"); var n2 = str.search(/Foo/i);

Answer

Correct Answer: n1 = 15, n2 = 8

Explanation:

Note: This Question is unanswered, help us to find answer for this one

PHP Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

PHP Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it