A
Q. Which one of the following is correct output for the following given JavaScript code:
Code:functionheight()
{
var height=123.56;
var type =(height>=190)?"Taller":"Little short";
return type;
}
Here, you will find a collection of MCQ questions on JavaScript. Go through these questions to enhance your preparation for upcoming examinations and interviews.
To check the correct answer, simply click the View Answer button provided for each question.
Have your own questions to contribute? Click the button below to share your MCQs with others!
+ Add QuestionA
functionheight()
{
var height=123.56;
var type =(height>=190)?"Taller":"Little short";
return type;
}
A
string X= "Good"; string Y="Evening"; alert(X+Y);
A
functionoutputfun(object)
{
var place=object ?object.place: "Italy";
return "clean:"+ place;
}
console.log(outputfun({place:India}));
A
<p id="demo"></p>
<script>
functionourFunction()
{
document.getElementById("demo").innerHTML=Math.abs(-7.25);
}
</script>
A
<p id="demo"></p>
<script>
function Function1()
{
document.getElementById("demo").innerHTML=Math.cbrt(792);
}
</script>
A
<p id="demo"></p>
<script>
functionmyFunction()
{
document.getElementById("demo").innerHTML=Math.acos(0.5);
}
</script>
A
A
A
A
var a =[]; a.unshift(5); a.unshift(22); a.shift(); a.unshift(3,[4,5]); a.shift(); a.shift(); a.shift();
If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.
Share Your MCQ