Javascript Questions and Answers

Practice Mode
Showing 10 of 78 questions
Q61
<script type="text/javascript" language="javascript"> var qpt = "QualityPointTechnologies"; var result =qpt.substring(7,8); document.write(result); </script>
  • A Po
  • B yP
  • C oi
  • D P
Answer: Option D
Q62
How do you delete an element from an options array?
  • A Set it to false.
  • B Set it to null.
  • C Set it to undefined.
  • D Set it to -1
Answer: Option B
Q63
Is javaScript case sensitive ?
  • A Yes
  • B No
Answer: Option A
Q64
JavaScript RegExp Object has modifier 'i' to __________
  • A Perform case-sensitive matching
  • B Perform case-insensitive matching
  • C Perform both case-sensitive&case-insensitive matching
Answer: Option B
Q65
What are the following looping structures are available in javascripts?
  • A for,forecach
  • B foreach,whileloop
  • C do-while loop,foreach
  • D for , while loop
Answer: Option D
Q66
Which of these is not a method of the Math object?
  • A atan()
  • B atan2()
  • C eval()
  • D acos()
Answer: Option C
Q67
<script type="text/javascript"> var s = "9123456 or 80000?"; var pattern = /\d{4}/; var output = s.match(pattern); document.write(output); </script>
  • A 9123
  • B 91234
  • C 80000
  • D None of the above
Answer: Option A
Q68
In javascript, RegExp Object Method test() is used to search a string and returns _________
  • A true or false
  • B found value
  • C index
  • D None of the above
Answer: Option A
Q69
What property would you use to redirect a visitor to another page?
  • A document.URL
  • B window.location.href
  • C .document.location.href
  • D link.href
Answer: Option B
Q70
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 ?
  • A Either (a) or (b)
  • B Only (a)
  • C Neither (a) nor (b)
  • D Only (b)
Answer: Option A
Questions and Answers for Competitive Exams Various Entrance Test