Javascript Questions and Answers

Take Exam

JavaScript questions with answers help web development students and IT professionals strengthen their coding fundamentals. Commonly asked in placement exams and interviews by companies like TCS, Infosys, and Wipro, these programming questions cover syntax, DOM manipulation, event handling, and ES6 features. Practicing JavaScript programming questions and answers enhances logical thinking and coding accuracy. These exercises are perfect for anyone aiming to master web technology and ace technical interviews with confidence.

Javascript

Showing 10 of 78 questions

51. Which feature is supported in MSIE 3.x?

  • split()
  • document.clear()
  • join()
  • charAt()
Show Answer Report

52. How to speicfy the color of the hypertext links with JavaScript ?

  • document.linkColor="#00FF00";
  • document.LColor="#00FF00";
  • document.LinkC="#00FF00";
  • document.hyperTextLink="#00FF00":
Show Answer Report

53. <script language="javascript"> function x() { var qpt = "QualityPointTechnologies"; var pattern = /point/; var output= qpt.search(pattern); document.write("Position: " + output); } </script>

  • Position-7
  • Position-1
  • null
  • error
Show Answer Report

54. --------------- method returns the number of milliseconds in a date string.

  • setHours()
  • setMinutes()
  • parse()
Show Answer Report

55. ------------- converts a string to floating point numbers.

  • eval
  • ParseInt
  • ParseFloat
  • None
Show Answer Report

56. ---------------------- attempts to evaluate a string representing any javascript literals or variables, converting it to a number.

  • eval
  • parseFloat
  • parseInt
  • None
Show Answer Report

57. Which is not an attribute of the cookie property?

  • path
  • host
  • secure
  • domain
Show Answer Report

58. How do substring() and substr() differ?

  • One is not a method of the String object.
  • substr() takes three arguments, substring() only two.
  • Only one accepts a desired string length as an argument.
  • Besides the spelling, nothing.
Show Answer Report

59. Which is not a reserved word?

  • interface
  • short
  • program
  • throws
Show Answer Report

60. In Javascript, Which of the following method is used to find out the character at a position in a string?

  • charAt()
  • CharacterAt()
  • CharPos()
  • characAt()
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test