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
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>
- in in In
- in in in
- in in null
- in null null