scrimba
JS Deep Dive
Functions
Challenge: Count Downwards Using Closure
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Challenge: Count Downwards Using Closure
AboutCommentsNotes
Challenge: Count Downwards Using Closure
Expand for more info
index.js
run
preview
console
// Challenge: Write a countdown function with a hard-coded starting number inside closure
// Stretch goal: Write a countdown function that can count from a provided number,
// with a provided step

// Start
function countdown() {
// write your code here
}

// const countingDown = countdown();

// console.log(countingDown());
// console.log(countingDown());
// console.log(countingDown());
Console
/index.html
-3:13