Javascript Questions and Answers

Practice Mode
Showing 10 of 78 questions
Q51
Which feature is supported in MSIE 3.x?
  • A split()
  • B document.clear()
  • C join()
  • D charAt()
Answer: Option D
Q52
How to speicfy the color of the hypertext links with JavaScript ?
  • A document.linkColor="#00FF00";
  • B document.LColor="#00FF00";
  • C document.LinkC="#00FF00";
  • D document.hyperTextLink="#00FF00":
Answer: Option A
Q53
<script language="javascript"> function x() { var qpt = "QualityPointTechnologies"; var pattern = /point/; var output= qpt.search(pattern); document.write("Position: " + output); } </script>
  • A Position-7
  • B Position-1
  • C null
  • D error
Answer: Option B
Q54
--------------- method returns the number of milliseconds in a date string.
  • A setHours()
  • B setMinutes()
  • C parse()
Answer: Option C
Q55
------------- converts a string to floating point numbers.
  • A eval
  • B ParseInt
  • C ParseFloat
  • D None
Answer: Option C
Q56
---------------------- attempts to evaluate a string representing any javascript literals or variables, converting it to a number.
  • A eval
  • B parseFloat
  • C parseInt
  • D None
Answer: Option A
Q57
Which is not an attribute of the cookie property?
  • A path
  • B host
  • C secure
  • D domain
Answer: Option B
Q58
How do substring() and substr() differ?
  • A One is not a method of the String object.
  • B substr() takes three arguments, substring() only two.
  • C Only one accepts a desired string length as an argument.
  • D Besides the spelling, nothing.
Answer: Option C
Q59
Which is not a reserved word?
  • A interface
  • B short
  • C program
  • D throws
Answer: Option C
Q60
In Javascript, Which of the following method is used to find out the character at a position in a string?
  • A charAt()
  • B CharacterAt()
  • C CharPos()
  • D characAt()
Answer: Option A
Questions and Answers for Competitive Exams Various Entrance Test