Javascript Question and Answer
Javascript Question and Answer
31. Choose the four symbol pairs that represent RegExp properties lastMatch, lastParent, leftContext, and rightContext, respectively:
- $&, $+, $`, $'
- $+, $&, $', $`
- $&, $~, $`, $'
- $+, $&, $`, $'
32. Which of the following properties hold the values of the pixels of the length of the width and height of the viewer's screen resolution?
- screen.width and screen.height
- Resolution.width and Resolution.height
- screen.pixels.width and screen.pixels.height
- ViewerScreen.width and ViewerScreen.height
34. Which JavaScript feature uses JAR files?
- Object signing
- Style sheets
- Netcaster channels
- Image rollovers
35. How to assign a function to a variable with the JavaScript Function contructor ?
- var f=Function("x","y","return x+y");
- var f=Function(x,y){ return x+y;}
- var f= new Function("x", "y", "return x + y");
36. In JavaScript, Window.alert() is used to allow user to enter something
- True
- False
- None of above
37. <script language="javascript">
function x()
{
var qpt = "We are fast growing Software Company located in Chennai, India.";
var pattern = new RegExp("in","gi");
document.write(pattern.exec(qpt) + " ");
document.write(pattern.exec(qpt) + " ");
document.write(pattern.exec(qpt) + " ");
}
</script>
function x()
{
var qpt = "We are fast growing Software Company located in Chennai, India.";
var pattern = new RegExp("in","gi");
document.write(pattern.exec(qpt) + " ");
document.write(pattern.exec(qpt) + " ");
document.write(pattern.exec(qpt) + " ");
}
</script>
- in in In
- in in in
- in in null
- in null null