Create a countdown from to :
for (let i = 10; i >= 1; i--) {
console.log(i)
}
console.log("Liftoff!")
Or with a while loop:
let count = 10
while (count >= 1) {
console.log(count)
count--
}
console.log("Liftoff!")
Both approaches work. Choose based on whether you know the count upfront (for) or not (while).