What would be the result or type of error if p is not defined in the following JavaScript ...
View Question
What will be the output of the following JavaScript code if oddsums(5); is executed after the following code snippet?
function oddsums(n)
{
let total = 0, result=[];
for(let x = 1; x <= n; x++)
{
let odd = 2*x-1;
total += odd;
result.push(total);
}
return result;
}
What will be the output of the following JavaScript code if oddsums(5); is executed after the following code ...
View QuestionThe main difference between the variables declared with var and with let is __________
a) var is confined to a particular function but let is not b) let is confined ...
View QuestionThe “let” keyword cannot be used ___________
a) as a substitute of var b) as a block statement to define new variables c) to define variables ...
View Question
What will be the output of the following JavaScript code?
const pi=3.14;
var pi=4;
console.log(pi);
What will be the output of the following JavaScript code? const pi=3.14; var pi=4; console.log(pi); a) This ...
View Question
What will be the output of the following JavaScript code?
set.add(“1”);
set.add(“2”);
document.writeln(set.has(“3”));
What will be the output of the following JavaScript code? set.add("1"); set.add("2");
View Question
What will be the output of the following JavaScript code?
set.add(“one”);
set.add(“two”);
var itr=set.values();
document.writeln(itr.next().value);
What will be the output of the following JavaScript code? set.add("one"); set.add("two”); var itr=set.values(); ...
View Question
What will be the output of the following JavaScript code?
set.add(“one”);
set.add(“two”);
set.add(“three”);
set.clear();
document.writeln(set.size);
What will be the output of the following JavaScript code? set.add("one"); set.add("two"); set.add("three"); ...
View Question
What will be the output of the following JavaScript code?
set.add(“AngularJS”);
set.add(“Bootstrap”);
set.delete(“Bootstrap”);
document.writeln(set.size);
What will be the output of the following JavaScript code? set.add("AngularJS"); set.add("Bootstrap");
View Question
What will be the output of the following JavaScript code?
var set = new Set();
set.add(“one”);
set.add(“two”);
for (let elements of set)
{
document.writeln(elements+” “);
}
What will be the output of the following JavaScript code? var set = new Set(); set.add("one"); ...
View Question