As you may know, JavaScript is the default scripting language of the browser. In addition, much test automation is also written in JavaScript. If you have not attempted the Part 1 of this Quiz, do that first. Then attempt this part of the quiz to find out how well you know JavaScript. If you can answer 8 or more questions correctly in each part, then you are a JavaScript expert :)
1. Where can JavaScript code be placed within an HTML document?
2. What does the expression Math.max(Math.round(Math.random()),0) return?
3. Which of the following date object methods has a 1-based return value (i.e. it returns a number between 1 and something)?
4. Which function returns a part of the array without affecting the original array?
5. How can parameters be accessed within the function body for a function defined without parameters and invoked with parameters?
6. Which function can be invoked on an existing node to add a child node?
7. What is the correct syntax for opening a new window or tab in the browser?
8. Which data should be set in document.cookie to create a cookie?
9. The try statement requires at least which of the following?
10. Which JavaScript object represents the browser?
Score is 0/ 10.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.