You must select a tag to post in this category. Please find the tag relating to the section of the course you are on E.g. loops, learn-compatibility
When you ask a question, don’t forget to include a link to the exercise or project you’re dealing with!
If you want to have the best chances of getting a useful answer quickly, make sure you follow our guidelines about how to ask a good question. That way you’ll be helping everyone – helping people to answer your question and helping others who are stuck to find the question and answer!
const are declarations for when you first declare a variable.
right. yes I got that, and using let to reassign did not work. so to reassign, you just do the variable and then the value?
var myCity = “Miami”;
myCity = “New York”;
Correct that is how you do it. It is preferred not to use
var since ES6 with the addition of
thanks. one question, since you are here, what are “let” and “const” and “var” called? i mean i know they are representing variables but is there a name for the declarations or are they just called declarations
let: Let this be a variable (I made this up)
They are keywords used in variable declarations.
Can’t do this:
let x = 5;
let x = 3;
(Although that might work if you used
var instead of
Can do this:
let x = 5;
x = 3;