Interested in supporting JS Questions Lab?|Contact for Sponsorship
JSJS QuestionsLAB
Questions
ProgressLeaderboardCreditsContact
JSJS QuestionsLAB

Built by @kitsunekode. Original questions and explanations by Lydia Hallie.

XProject Repository

Product

  • Questions
  • Progress
  • Release notes
  • Credits

Resources

  • Project Repository
  • Lydia's Original Repo

Question content is based on Lydia Hallie's original 2019 repository, so newer JavaScript language features may not be covered everywhere. Learn more

JSQL ยท v0.1.7
155 Questions

Question Library

Browse and practice JavaScript interview questions. Commit to an answer, then explore the explanation and run the code.

Command Palette

Search for a command to run...

18/155 questions

1/9

#1Beginner

What's the output?

function sayHi() {
console.log(name);
console.log(age);
scopeobjects+1
Practice
#2Beginner

What's the output?

for (var i = 0; i < 3; i++) {
setTimeout(() => console.log(i), 1);
}
asyncscope+1
Practice
#3Beginner

What's the output?

const shape = {
radius: 10,
diameter() {
scopeobjects+1
Practice
#4Beginner

What's the output?

+true;
!'Lydia';
typesoperators
Practice
#5Beginner

Which one is true?

const bird = {
size: 'small',
};
objectstypes
Practice
#6Beginner

What's the output?

let c = { greeting: 'Hey!' };
let d;
objects
Practice
#7Beginner

What's the output?

let a = 3;
let b = new Number(3);
let c = 3;
objectsprototypes
Practice
#8Beginner

What's the output?

class Chameleon {
static colorChange(newColor) {
this.newColor = newColor;
prototypes
Practice
#9Beginner

What's the output?

let greeting;
greetign = {}; // Typo!
console.log(greetign);
objectsoperators
Practice
#10Beginner

What happens when we do this?

function bark() {
console.log('Woof!');
}
objects
Practice
#11Beginner

What's the output?

function Person(firstName, lastName) {
this.firstName = firstName;
this.lastName = lastName;
objectsprototypes+1
Practice
#12Beginner

What's the output?

function Person(firstName, lastName) {
this.firstName = firstName;
this.lastName = lastName;
objectstypes
Practice
#13Beginner

What are the three phases of event propagation?

fundamentals
Practice
#14Beginner

All object have prototypes.

objectsprototypes
Practice
#15Beginner

What's the output?

function sum(a, b) {
return a + b;
}
arraystypes
Practice
#16Beginner

What's the output?

let number = 0;
console.log(number++);
console.log(++number);
operators
Practice
#17Beginner

What's the output?

function getPersonInfo(one, two, three) {
console.log(one);
console.log(two);
arraystemplate-literals
Practice
#18Beginner

What's the output?

function checkAge(data) {
if (data === { age: 18 }) {
console.log('You are an adult!');
objects
Practice
...