header1.html

Sunday, 26 January 2014

Javascript MCQs(Multiple Choice Questions)


Hello All first I would like to Wish you all Happy New year 2014,so before going to new post here are some last years Successful popular posts,
1)CRUD operation using Entity Framework and LINQ
2)Basic Web Development MCQs
3)New Features of VS 2013 Developers Perspective
4)WCF Online Quiz or WCF MCQs
and many more are there so please visit them and do share,like & comment on it.
1.What will be result of following javascipt function
<script type="text/javascript">
var name = "CareerWebHelper";
function DisplayName () {
var name = "Sagar"; 
document.write(name); 
}
</script>
A.CareerWebHelper
B.Sagar
C.Error
D.None of above
Click for answer 

B.Sagar
2.What will be result of following javascipt function
<script type="text/javascript">
var name1 = "WCF MCQs";
function DisplayName () {
var name2 = " Online"; 
document.write(name1+name2); 
}
</script>
A.WCF MCQsOnline
B.WCF MCQs Online
C.Object required error
D.Javascript Error
Click for answer 

B.WCF MCQs Online
3.What will be result of following javascipt function?
<script type="text/javascript">
var name1 = "WCF quiz";

function DisplayName () {
 var name2 = "ASP.NET MCQs";
if(name1 != "") 
document.write(name1);
else
document.write(name2);
 
}
</script>
A.Javascript Error at else statement
B.ASP.NET MCQs
C.WCF quiz
D.Javascript Error in if condition
Click for answer 

C.WCF quiz
4.What will be result of following javascipt function?
<script type="text/javascript">
var name1 = "WCF quiz";

function DisplayName () {
 var name2 = "ASP.NET MCQs";
 (name1 != ""?document.write(name2):document.write(name1));
}
</script>
A.WCF quiz
B.ASP.NET MCQs
C.Javascript Error near conditional statement
D.Nothing will happen
Click for answer 

B.ASP.NET MCQs
5.What will be result of following javascipt function?
<script type="text/javascript">
var name1 = "";

function DisplayName () {
 var name2 = "ASP.NET MCQs";
 if(name1 = "")
document.write("name1 is null");
else
document.write(name2);
 
}
</script>
A.name1 is null
B.Error near name1 declaration
C.No result
D.ASP.NET MCQs
Click for answer 

D.ASP.NET MCQs
6.What will be result of following javascipt function?
<script type="text/javascript">
var name1 = "WPF Quiz";

function DisplayName () {
 var name2 = "ASP.NET MCQs";
 if(name1 = "WPF Quiz")
document.write("name1 is not null");
else
document.write(name2);
 
}
</script>
A.ASP.NET MCQs
B.Error near if statement
C.name1 is not null
D.None of above
Click for answer 

C.name1 is not null
7.What will be result of following javascipt function?
<script type="text/javascript">
var name1 = "WPF Quiz";

function DisplayName () {
 var name2 = "ASP.NET MCQs";
 (name1.replace('P','C')=="WCF Quiz"?document.write(name1):document.write(name2));
}
</script>
A.WPF Quiz
B.WCF Quiz
C.ASP.NET MCQs
Click for answer 

A.WPF Quiz
8.What will be result of following javascipt function?
<script type="text/javascript">
var name1 = "WPF Quiz";
function DisplayName () {
 var name2 = "ASP.NET MCQs";
 name1=name1.replace('P','C');
 document.write(name1);
}
</script>
A.WCF Quiz
B.WPF Quiz
C.ASP.NET MCQs
D.Error in statement near replace()
Click for answer 

A.WCF Quiz