Javascript Quiz 1 !!!

Raghuraman Kesavan
Bondesk.In
Published in
1 min readSep 26, 2017

Try to answer the following questions!! Check these question & check your javascript proficiency.

1. True or False?

var a = true;
if(a == 1){
console.log("True");
}else{
console.log("False");
}

2. True or False?

var a = true;
if(a === 1){
console.log("True");
}else{
console.log("False");
}

3. What will be the output of the following program?

function myFunction() {
return
{
a : 0
}
}
console.log(myFunction());

4. What will be the output of the following program?

var a = 110;
var b = 012;

console.log(a+b);

5.What will be the output of the following program?

var myVariable = 10;

function myFunction() {
myVariable = 25;
var myVariable;
}
myFunction();

console.log(myVariable);

For the solutions, Please check the comment section below!! If you need clarification for any of the above problem. Please let me know in the comment section.

--

--