โœ•
โœ๏ธ Content byMd. Rakibul Islam
๐ŸŽฏ
MCQ
Multiple Choice ยท 100 questions
1Easydata typesโฑ 30s

What does typeof null return in JavaScript?

โ–ผ
2Easyhoistingโฑ 40s

What is the output of the following code?

โ–ผ
javascript
console.log(x);
var x = 5;
3Easydata typesโฑ 30s

Which of the following is NOT a primitive data type in JavaScript?

โ–ผ
4Easyoperatorsโฑ 30s

What is the key difference between == and === in JavaScript?

โ–ผ
5Easyarrow functionsโฑ 60s

What does the following code output?

โ–ผ
javascript
const obj = {
  name: 'Dev',
  greet: () => {
    console.log('Hello, ' + this.name);
  }
};
obj.greet();
6Easyarraysโฑ 20s

Which method adds one or more elements to the END of an array and returns the new length?

โ–ผ
7Easynumbersโฑ 30s

What is the output of: console.log(0.1 + 0.2 === 0.3)?

โ–ผ
8Easyscopeโฑ 60s

What does the following code output?

โ–ผ
javascript
for (let i = 0; i < 3; i++) {
  setTimeout(() => console.log(i), 0);
}
9Easyarraysโฑ 30s

How do you correctly check if a variable is an Array?

โ–ผ
10Easystring methodsโฑ 30s

What is the output of the following code?

โ–ผ
javascript
let str = 'hello';
str.toUpperCase();
console.log(str);
11Easyvariablesโฑ 25s

Which keyword declares a variable that cannot be reassigned?

โ–ผ
12Easydata typesโฑ 20s

What is the output of: console.log(typeof undefined);

โ–ผ
javascript
console.log(typeof undefined);
13Easytruthy/falsyโฑ 30s

Which of these values is considered falsy in JavaScript?

โ–ผ
14Easyvariablesโฑ 30s

What is the difference between let and var in terms of scope?

โ–ผ
15Easyloopsโฑ 25s

What does the following loop print?

โ–ผ
javascript
for (let i = 0; i < 3; i++) {
  console.log(i);
}
16Easyoperatorsโฑ 20s

Which operator is used to check strict inequality?

โ–ผ
17Easyfunctionsโฑ 25s

What will `typeof function(){}` return?

โ–ผ
javascript
console.log(typeof function(){});
18Easysyntax basicsโฑ 15s

How do you write a single-line comment in JavaScript?

โ–ผ
19Easyoperatorsโฑ 35s

What is the output of the following code?

โ–ผ
javascript
console.log('5' + 3);
console.log('5' - 3);
20Easyarraysโฑ 20s

Which array method removes the LAST element and returns it?

โ–ผ

Showing 1โ€“20 of 100 questions

Javascript MCQ Interview Questions โ€” All Levels | UyTech