Javascript Questions and Answers
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()
52. How to speicfy the color of the hypertext links with JavaScript ?
- document.linkColor="#00FF00";
- document.LColor="#00FF00";
- document.LinkC="#00FF00";
- document.hyperTextLink="#00FF00":
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
54. --------------- method returns the number of milliseconds in a date string.
- setHours()
- setMinutes()
- parse()
55. ------------- converts a string to floating point numbers.
- eval
- ParseInt
- ParseFloat
- None
56. ---------------------- attempts to evaluate a string representing any javascript literals or variables, converting it to a number.
- eval
- parseFloat
- parseInt
- None
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.
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()