JAVASCRIPT Interview Practice #2

Q1. What keyword is used to check whether a given property is valid or not?







Q2. How many types of Pop up boxes available in JavaScript?







Q3. what will be used for calling the function definition expression?







Q4. What will be the output of the following code?

var a = true + true + true * 5;
console.log(a)






Q5. What will be the output of the following code?

console.log(NaN === NaN)






Q6. What will be the output of the below code?

console.log(typeof(NaN))






Q7. Which function is used to serialize an object into a JSON string?







Q8. What will be the output of the below code?

var a = '25';

var b = a = 15;

console.log(a+b);






Q9. What will be the output of the below code?

let sum = 0; 
const array = [5, 10, 15];
array.forEach(getSum);
function getSum(val) {
   sum += val;
}
console.log(sum);






Q10. Which one of the following is an ternary operator?