New: We've launched a brand new Coding Challenges section! Check out these interactive, real-world exercises to level up your skills.Explore Challenges
FrontendPrep
JavaScript Quiz

JavaScript Fundamentals

Test your knowledge on core JavaScript concepts including variables, scope, hoisting, and closures.

Question 1 of 100%

What will be printed here?

javascript
function outer() {
  let count = 0;
  return function inner() {
    count++;
    return count;
  }
}
const counter = outer();
console.log(counter());
console.log(counter());