Interview Preparation Coding Interview Objective
May 09, 2013

What is the output of bellow JavaScript code?
<script type="text/javascript">
function x()
{
var t = "Quality 100%!{[!!";
var pattern = /\w/g;
var output = t.match(pattern);
document.write(output);
}
</script>

Choose the correct answer:
A) Quality 100
B) Quality
C) %,!,{,[,!,!
D) Q,u,a,l,i,t,y,1,0,0
Detailed Explanation

Option D is the right Answer.

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback