What will be the last statement return in the following JavaScript code? function constfuncs() { ...
View Question
What will be the state stored in d in the following JavaScript code?
var c = counter(), d = counter();
c.count()
d.count()
c.reset()
c.count()
d.count()
What will be the state stored in d in the following JavaScript code? var c = counter(), d ...
View Question
What is the difference between the two lines in the following JavaScript code?
!!(obj1 && obj2);
(obj1 && obj2);
What is the difference between the two lines in the following JavaScript code? !!(obj1 && obj2); (obj1 && ...
View Question
What will be the equivalent statement of the following JavaScript statement?
var o = new Object();
What will be the equivalent statement of the following JavaScript statement? var o = new Object(); a) ...
View QuestionIf you have a function f and an object o, you can define a method named m of o with ________
a) o.m=m.f; b) o.m=f; c) o=f.m; d) o=f; Answer: b Explanation: A method is nothing more than a JavaScript ...
View QuestionThe one-liner code that concatenates all strings passed into a function is ____________
a) function concatenate() { return ...
View Question
What will be the output of the following JavaScript code?
var string2Num=parseInt(“123xyz”);
What will be the output of the following JavaScript code? var string2Num=parseInt("123xyz"); a) 123 b) 123xyz c) Exception d) NaN
View Question
Will the following JavaScript code work?
var tensquared = (function(x) {return x*x;}(10));
Will the following JavaScript code work? var tensquared = (function(x) {return x*x;}(10)); a) Yes, perfectly b) error c) Exception ...
View QuestionDo functions in JavaScript necessarily return a value?
Do functions in JavaScript necessarily return a value? a) It is mandatory b) Not necessary c) Few functions return ...
View Question
What will be the output of the following JavaScript statement?
var grand_Total=eval(“10*10+5”);
What will be the output of the following JavaScript statement? var grand_Total=eval("10*10+5"); a) 10*10+5 b) 105 as a ...
View Question