What is the output of following JavaScript code? <script type=\"text/javascript\
ID: 3544062 • Letter: W
Question
What is the output of following JavaScript code?
<script type="text/javascript">
function x()
{
var s= "Good 100%";
var pattern = /D/g;
var output= s.match(pattern);
document.write(output);
}
</script>
a) Good %
b) 1,0,0
c) G,o,o,d,%
d) Error
What is the output of following JavaScript code?
<script type="text/javascript">
var cst="CHADHA SOFTWARE TECHNOLOGIES";
alert(cst.charAt(cst.length-1));
</script>
a) P
b) E
c) S
d) Error
What is the output of following JavaScript code?
<script type="text/javascript">
function x(z,t)
{
alert(x.length);
}
</script>
a) Error
b) 2
c) 1
d) 3
What is meant by "this" keyword in JavaScript?
a) It refers current object
b) It referes previous object
c) It is variable which contains value
d) None of the above
What is the output of following JavaScript code?
<script type="text/javascript">
function x()
{
var s = "Quality 100%!{[!!";
var pattern = /w/g;
var output = s.match(pattern);
document.write(output);
}
</script>
a) %,!,{,[,!,!
b) Q,u,a,l,i,t,y,1,0,0
c) Quality 100
d) Error
Explanation / Answer
c
c
b
a
b
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.