2. | Which of the following is the correct syntax to print a page using JavaScript? |
Discuss |
Answer: (a).window.print();
|
3. | Which of the following type of variable is visible only within a function where it is defined? |
Discuss |
Answer: (b).local variable
|
4. | Which built-in method returns the calling string value converted to upper case? |
Discuss |
Answer: (a).toUpperCase()
|
5. | Which of the following function of Number object returns the number's value? |
Discuss |
Answer: (b).valueOf()
|
6. | Which of the following function of String object returns the index within the calling String object of the first occurrence of the specified value? |
Discuss |
Answer: (d).indexOf()
|
7. | Which of the following function of String object creates an HTML anchor that is used as a hypertext target? |
Discuss |
Answer: (a).anchor()
|
8. | Which of the following function of String object causes a string to be displayed as struck-out text, as if it were in a strike tag? |
Discuss |
Answer: (c).strike()
|
9. | Which of the following is true about variable naming conventions in JavaScript? |
Discuss |
Answer: (c).Both of the above.
|
10. | Which of the following is the correct syntax to redirect a url using JavaScript? |
Discuss |
Answer: (d).window.location='http://www.newlocation.com';
|