Javascript Question and Answer

Javascript Question and Answer
71. <script type="text/javascript" language="javascript">
var qpt = "QualityPointTechnologies";
var result =qpt.indexOf("Tech");
document.write(result);
</script>
  • 11
  • 12
  • 15
  • 13
Show Answer
72. <script language="javascript">
function x()
{
var s = "Eat to live, but do not live to eat";
var pattern = new RegExp("eat$");
document.write(pattern.exec(s));
}
</script>
  • Eat
  • eat
  • undefined
  • Eat eat
Show Answer
73. <script language="javascript">
function x()
{
var qpt = "We are fast growing Software Company located in Chennai, India.";
var pattern = new RegExp("in","g");

document.write(pattern.exec(qpt) + " ");
document.write(pattern.exec(qpt) + " ");
document.write(pattern.exec(qpt) + " ");
}

</script>
  • in in In
  • in in in
  • in in null
  • in null null
Show Answer
74. -------------- method is used to remove focus from the specified object.
  • blur()
  • focus()
  • None
Show Answer
75. parseFloat(“FF2”)=?
  • 152
  • FF2
  • NaN
  • None
Show Answer
76. eval((20*4)=?
  • Nan
  • 204
  • 24
  • 80
Show Answer
77. <script language="javascript">
function x()
{
var qpt = "QualityPointTechnologies";
var pattern = new RegExp("TECHNOLOGIES","i");
document.write(qpt.match(pattern));
}
</script>
  • null
  • Technologies
  • TECHNOLOGIES
  • Error
Show Answer
78. Javascript is a ________ typed language.
  • tightly
  • loosely
Show Answer
Questions and Answers for Competitive Exams Various Entrance Test