Javascript Quiz

Javascript Quiz 1 !!!

Try to answer the following questions!!

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 solution, Please check the comment section!! If you need clarification for any of the above problem. Please let me know in the comment section.