a) If the object inherits enumerable properties b) The object does not have the properties present in the ...
View Question
What happens in the following javaScript code snippet?
var count = 0;
while (count < 10)
{
console.log(count);
count++;
}
What happens in the following javaScript code snippet? var count = 0; while (count < 10) {
View Question
In the following switch syntax, the expression is compared with the case labels using which of the following operator(s)?
switch(expression)
{
statements
}
In the following switch syntax, the expression is compared with the case labels using which of the following ...
View QuestionThe “var” and “function” are __________
a) Keywords b) Declaration statements c) Data types d) Prototypes Answer: b Explanation: The var and function are declaration ...
View QuestionWhen an empty statement is encountered, a JavaScript interpreter __________
a) Ignores the statement b) Prompts to complete the statement c) Throws an error d) Shows a warning Answer: ...
View QuestionWhat is a block statement in JavaScript?
a) conditional block b) block that contains a single statement c) both conditional block and a single ...
View Question
Which is a more efficient JavaScript code snippet?
Code 1 :
for(var num=10;num>=1;num–)
{
document.writeln(num);
}
Code 2 :
var num=10;
while(num>=1)
{
document.writeln(num);
num++;
}
Which is a more efficient JavaScript code snippet? Code 1 : for(var num=10;num>=1;num--) { ...
View QuestionA conditional expression is also called a _______________
a) Alternative to if-else b) Immediate if c) If-then-else statement d) Switch statement Answer: b Explanation: A conditional expression ...
View Question
What will be the output of the following JavaScript code?
var a=5 , b=1
var obj = { a : 10 }
with(obj)
{
alert(b)
}
What will be the output of the following JavaScript code? var a=5 , b=1 var obj = { ...
View QuestionJavaScript is a _______________ language.
a) Object-Oriented b) High-level c) Assembly-language d) Object-Based Answer: d Explanation: ...
View Question