Javascript Questions and Answers

Practice Mode
Showing 10 of 78 questions
Q31
Choose the four symbol pairs that represent RegExp properties lastMatch, lastParent, leftContext, and rightContext, respectively:
  • A $&, $+, $`, $'
  • B $+, $&, $', $`
  • C $&, $~, $`, $'
  • D $+, $&, $`, $'
Answer: Option A
Q32
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?
  • A screen.width and screen.height
  • B Resolution.width and Resolution.height
  • C screen.pixels.width and screen.pixels.height
  • D ViewerScreen.width and ViewerScreen.height
Answer: Option A
Q33
ParseInt("15",10)=?
  • A 15
  • B 10
  • C 151
  • D 150
Answer: Option A
Q34
Which JavaScript feature uses JAR files?
  • A Object signing
  • B Style sheets
  • C Netcaster channels
  • D Image rollovers
Answer: Option A
Q35
How to assign a function to a variable with the JavaScript Function contructor ?
  • A var f=Function("x","y","return x+y");
  • B var f=Function(x,y){ return x+y;}
  • C var f= new Function("x", "y", "return x + y");
Answer: Option C
Q36
In JavaScript, Window.alert() is used to allow user to enter something
  • A True
  • B False
  • C None of above
Answer: Option B
Q37
<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>
  • A in in In
  • B in in in
  • C in in null
  • D in null null
Answer: Option A
Q38
Is Javascript has any date data type?
  • A Yes
  • B No
Answer: Option B
Q39
Math. round(-20.5)=?
  • A -21
  • B 20
  • C -20
  • D 21
Answer: Option C
Q40
?_name is it valid javascript identifier?
  • A Yes
  • B No
Answer: Option B
Questions and Answers for Competitive Exams Various Entrance Test