What did i get wrong


#1

when im trying to acess vacationSpotIndex inside console log i get error… if i just do it with the variable name it works but then i dont think its the point of the exercise
what . did i get wrong?
cheers


#2

let gives the variable a block scope, so for (let = vacationSpotsIndex will cause vacationSpotsIndex to exist only within the for loop block


#3

so i moved the console.log to inside the block the output changed but the error in exercise remained… codeacademy bug? or i still didnt get it?


#4

for this exercise step, you need 3 separate consol.logs, no for loop yet


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.