Fantastisk!
Completion rate forbedret til 2Sektion 3. Kapitel 11
single
Constant 3/3
Stryg for at vise menuen
const Does Not Allow Hoisting
As discussed in the previous chapter, let does not allow hoisting i.e. we cannot use a variable before the declaration. Just like let we can not use hoisting with the const.it is only supported with var.
123MYPLANET = 'earth'; console.log(MYPLANET); const MYPLANET;
Opgave
Swipe to start coding
Rearrange the following code to display the value of SALARY on the console.
Løsning
Summary:
- We can neither change the values of the
constvariables through reassignment nor we can redeclare them. - Value should be assigned to
constvariables at the time of declaration.
Var alt klart?
Tak for dine kommentarer!
Sektion 3. Kapitel 11
single
Spørg AI
Spørg AI
Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat