Instruction
- Total number of questions : 10.
- Time alloted : 10 minutes.
- Each question carry 1 mark.
- No Negative marks
- DO NOT refresh the page.
- All the best :-).
1. |
Which of the following Attribute is used to include External JS code inside your HTML Document |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option A Explanation: A ”src” attribute could be used to add any external code into the HTML document. |
2. |
The statement a===b refers to |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option C Explanation: a==b returns a true if a and b refer to the same objec ,so they are equal, else it returns a false. |
3. |
“An expression that can legally appear on the left side of an assignment expression.” is a well known explanation for variables, properties of objects, and elements of arrays. They are called |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option C Explanation: lvalue is a historical term that means “an expression that can legally appear on the left side of an assignment expression.” In JavaScript, variables, properties of objects, and elements of arrays are lvalues. |
4. |
Consider the following statements var count = 0; while (count < 10) { console.log(count); count++; } In the above code snippet, what happens? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option B Explanation: None. |
5. |
Consider the following code snippet function f(o) { if (o === undefined) debugger; } What could be the task of the statement debugger? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option A Explanation: The debugger statement normally does nothing. If, however, a debugger program is available and is running, then an implementation may (but is not required to) perform some kind of debugging action. In practice, this statement acts like a breakpoint: execution of JavaScript code stops and you can use the debugger to print variable’s values. |
6. |
Identify the process done in the below code snippet o = {x:1, y:{z:[false,null,""]}}; s = JSON.stringify(o); p = JSON.parse(s); |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option B Explanation: Object serialization is the process of converting an object’s state to a string from which it can later be restored. |
7. |
The reduce and reduceRight methods follow a common operation called |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option B Explanation: None |
8. |
Which is an equivalent code to invoke a function m of class o that expects two arguments x and y? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option D Explanation: The code above is an invocation expression: it includes a function expression o.m and two argument expressions, x and y. |
9. |
Consider the following code snippet : var c = counter(),d = counter(); c.count() d.count() c.reset() c.count() d.count() The state stored in d is : |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option A Explanation: The state stored in d is 1 because d was not reset. |
10. |
What is the purpose of the dynamic scoping? |
|||||||||||||||||||
|