#JavaScript n00b - undefined variable

6 messages · Page 1 of 1 (latest)

narrow creek
#
    <script>

        
         let todo1 = 'Get groceries';
         let todo2 = 'Wash car';
         let todo3 = 'Make dinner';
         </script>


#

why is it not working

polar flax
#

JavaScript n00b - undefined variable

#

It should be. Is that all of the code you have????

#

Where exactly is that script tag located?

plain trench
#

And is the console log running after you've declared the variables