Javascript Question and Answer

Javascript Question and Answer
31. Choose the four symbol pairs that represent RegExp properties lastMatch, lastParent, leftContext, and rightContext, respectively:
  • $&, $+, $`, $'
  • $+, $&, $', $`
  • $&, $~, $`, $'
  • $+, $&, $`, $'
Show Answer
32. Which of the following properties hold the values of the pixels of the length of the width and height of the viewer's screen resolution?
  • screen.width and screen.height
  • Resolution.width and Resolution.height
  • screen.pixels.width and screen.pixels.height
  • ViewerScreen.width and ViewerScreen.height
Show Answer
33. ParseInt(“15”,10)=?
  • 15
  • 10
  • 151
  • 150
Show Answer
34. Which JavaScript feature uses JAR files?
  • Object signing
  • Style sheets
  • Netcaster channels
  • Image rollovers
Show Answer
35. How to assign a function to a variable with the JavaScript Function contructor ?
  • var f=Function("x","y","return x+y");
  • var f=Function(x,y){ return x+y;}
  • var f= new Function("x", "y", "return x + y");
Show Answer
36. In JavaScript, Window.alert() is used to allow user to enter something
  • True
  • False
  • None of above
Show Answer
37. <script language="javascript">
function x()
{
var qpt = "We are fast growing Software Company located in Chennai, India.";
var pattern = new RegExp("in","gi");

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
38. Is Javascript has any date data type?
  • Yes
  • No
Show Answer
39. Math. round(-20.5)=?
  • -21
  • 20
  • -20
  • 21
Show Answer
40. ?_name is it valid javascript identifier?
  • Yes
  • No
Show Answer
Questions and Answers for Competitive Exams Various Entrance Test