Javascript Question and Answer

Javascript Question and Answer
61. <script type="text/javascript" language="javascript">
var qpt = "QualityPointTechnologies";
var result =qpt.substring(7,8);
document.write(result);
</script>
  • Po
  • yP
  • oi
  • P
Show Answer
62. How do you delete an element from an options array?
  • Set it to false.
  • Set it to null.
  • Set it to undefined.
  • Set it to -1
Show Answer
63. Is javaScript case sensitive ?
  • Yes
  • No
Show Answer
64. JavaScript RegExp Object has modifier 'i' to __________
  • Perform case-sensitive matching
  • Perform case-insensitive matching
  • Perform both case-sensitive&case-insensitive matching
Show Answer
65. What are the following looping structures are available in javascripts?
  • for,forecach
  • foreach,whileloop
  • do-while loop,foreach
  • for , while loop
Show Answer
66. Which of these is not a method of the Math object?
  • atan()
  • atan2()
  • eval()
  • acos()
Show Answer
67. <script type="text/javascript">
var s = "9123456 or 80000?";
var pattern = /\d{4}/;
var output = s.match(pattern);
document.write(output);
</script>
  • 9123
  • 91234
  • 80000
  • None of the above
Show Answer
68. In javascript, RegExp Object Method test() is used to search a string and returns _________
  • true or false
  • found value
  • index
  • None of the above
Show Answer
69. What property would you use to redirect a visitor to another page?
  • document.URL
  • window.location.href
  • .document.location.href
  • link.href
Show Answer
70. a.) var qpt="Quality Point Technologies";

b.) var qpt=new String("Quality Point Technologies");

Question:
In javascript, which of the above statement can used for string declaration ?
  • Either (a) or (b)
  • Only (a)
  • Neither (a) nor (b)
  • Only (b)
Show Answer
Questions and Answers for Competitive Exams Various Entrance Test