Do...While Statements

Hey guys, I needed help on one of the loop exercises that I came across in the “Do…While Statements” section. As shown in the picture, I’ve tried doing this, but it’s showing errors in the console. Just wondering what did I do wrong here? Thanks a bunch. Here’s the link to the exercise (https://www.codecademy.com/courses/introduction-to-javascript/lessons/loops/exercises/do-while-statement?action=resume_content_item)

Hey @snailmachine!
You can’t modify const variables… try changing it to let or var!

const variables are read-only, so if you define them, you’re not gonna be able to change them.

let, on the other hand, has the ability to be changed, similar to var

You can read through @stetim94’s answer to this here:

Hope this helps!
Steven

3 Likes

Oh careless me! Always miss out on simplest little details like that. @stevencopeland thanks for pointing that out! Appreciate it. :pray:

3 Likes