What will be the output of the following JavaScript code? function compare() { int a=1; ...
View QuestionThe snippet that has to be used to check if “a” is not equal to “null” is _________
a) if(a!=null) b) if(a!null) c) if (!a) d) if(a!==null) Answer: d Explanation: A strict comparison (e.g., ===) is only ...
View Question
What will be the output of the following JavaScript code?
int a=1;
if(a!=null)
return 1;
else
return 0;
What will be the output of the following JavaScript code? int a=1; if(a!=null) return 1; else ...
View QuestionThe type of a variable that is volatile is _______________
a) Immutable variable b) Mutable variable c) Dynamic variable d) Volatile variable Answer: b Explanation: The variables whose values ...
View QuestionWhich of the following Attribute is used to include External JS code inside your HTML Document?
a) ext b) src c) link d) script Answer: b Explanation: Script “tag” is used to include the JavaScript ...
View QuestionThe escape sequence ‘\f’ stands for _________
a) \f is not present in JavaScript b) Floating numbers c) Representation of functions that returns a ...
View Question
What will be the output of the following JavaScript code?
int a==2;
int b=4;
int ans=a+b;
print(ans);
What will be the output of the following JavaScript code? int a==2; int b=4; int ans=a+b; print(ans); a) 0
View Question
What will be the output of the following JavaScript code?
function equalto()
{
int num=10;
if(num===”10”)
return true;
else
return false;
}
What will be the output of the following JavaScript code? function equalto() { int num=10; ...
View QuestionThe statement a===b refers to _________
a) Both a and b are equal in value and type b) Both a and b are equal ...
View QuestionJavaScript _________ when there is an indefinite or an infinite value during an arithmetic computation.
a) Prints an overflow error b) Prints an exception error c) Displays “Infinity” d) Prints the value as such
View Question