Javascript – What is the scope of variable declared by 'let' in a script tag
Consider following code snippet: <script> let a=1; console.log(a); //prints 1 </script> <script> console.log(a); //prints 1 </script> I want to ask if a is block scoped due to the declaration by let which means it is scoped to single <script> tag…