Take as many assements as you can to improve your validate your skill rating
Total Questions: 20
1. What does the rel attribute of a variable have when the type of file is CSS?
Correct Answer is : stylesheet
2. What is the parameter of the method getElementsbyTagName() if we need to get an image?
Correct Answer is : img
3. How do we stop blocking of loading and executing the perfLogger, a logging type data?
Correct Answer is : Inlining the perfLogger
4. The web development environment (JavaScript) offers which standard construct for data validation of the input entered by the user.
Correct Answer is : All of the mentioned
5. The main purpose of a “Live Wire” in NetScape is to ________
Correct Answer is : Permit server side, JavaScript code, to connect to RDBMS
6. The script tag must be placed in __________
Correct Answer is : the head or body
7. A JavaScript program developed on a Unix Machine ________
Correct Answer is : will work perfectly well on a Windows Machine
8. JavaScript is ideal to ________
Correct Answer is : minimize storage requirements on the web server
9. Which attribute is used to specify that the script is executed when the page has finished parsing? (only for external scripts)
Correct Answer is : defer
10. JavaScript Code can be called by using ____________
Correct Answer is : Function/Method
11. JavaScript can be written __________
Correct Answer is : directly into JS file and included into HTML
12. Which of the following Attribute is used to include External JS code inside your HTML Document?
Correct Answer is : src
13. A proper scripting language is a __________
Correct Answer is : High level programming language
14. Consider the following code snippet.
function printArray(a)
{
var len = a.length, i = 0;
if (len == 0)
console.log("Empty Array");
else
{
do
{
console.log(a[i]);
} while (++i < len);
}
}
What does the above code result?
Correct Answer is : Prints the numbers in the array in order
15. What will the following code snippet work? If not, what will be the error?
function tail(o)
{
for (; o.next; o = o.next) ;
return o;
}
Correct Answer is : Yes, this will work
16. Consider the following code snippet.
for(var p in o)
console.log(o[p]);
The above code is equivalent to which code?
Correct Answer is : for (var i = 0;i < a.length;i++)
17. One of the special feature of an interpreter in reference with the for loop is that ___________
Correct Answer is : Before each iteration, the interpreter evaluates the variable expression and assigns the name of the property
18. What will happen if the body of a for/in loop deletes a property that has not yet been enumerated?
Correct Answer is : That property will not be enumerated
19. What will be the step of the interpreter in a jump statement when an exception is thrown?
Correct Answer is : The interpreter jumps to the nearest enclosing exception handler
20. Consider the following code snippet.
while (a != 0)
{
if (a == 1)
continue;
else
a++;
}
What will be the role of the continue keyword in the above code snippet?
Correct Answer is : The continue keyword skips the rest of the statements in that iteration