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>
var qpt = "QualityPointTechnologies";
var result =qpt.substring(7,8);
document.write(result);
</script>
- Po
- yP
- oi
- P
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
64. JavaScript RegExp Object has modifier 'i' to __________
- Perform case-sensitive matching
- Perform case-insensitive matching
- Perform both case-sensitive&case-insensitive matching
65. What are the following looping structures are available in javascripts?
- for,forecach
- foreach,whileloop
- do-while loop,foreach
- for , while loop
67. <script type="text/javascript">
var s = "9123456 or 80000?";
var pattern = /\d{4}/;
var output = s.match(pattern);
document.write(output);
</script>
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
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
69. What property would you use to redirect a visitor to another page?
- document.URL
- window.location.href
- .document.location.href
- link.href
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 ?
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)