\n\n\n\n","text":"Predict the output of the following JavaScript code:\n\n\n\n\n\n\n\n\n\n","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"Correct answer: p,a,s,s, ,%, ,f,a,i,l, ,%. The correct answer is: p,a,s,s, ,%, ,f,a,i,l, ,%.","url":"https://primerdumps.in/q/predict-the-output-of-the-following-javascript-code-var-txt-pass-70"}}}
Essentials
Accenture PrimermediumEssentialsWeb Technologies

Predict the output of the following JavaScript code: <html> <head> <script> var txt= "pass 70% fail 30%"; var pattern = /\D/g; var res= txt.match(pattern); document.write(res); </script> </head> </html>

Answer options

A
p,a,s,s, ,%, ,f,a,i,l, ,%
B
JavaScript
C
HTML5
D
innerHTML

Correct answer: p,a,s,s, ,%, ,f,a,i,l, ,%

Explanation

The correct answer is: p,a,s,s, ,%, ,f,a,i,l, ,%.

Related Accenture Essentials questions

Practice more Accenture Essentials questions

PrimerDumps has 1400+ primer questions, 2026 mocks and coding hands-on — all free.