4 июня 2020
L P<script>let age = 20 </script> <script>let age = 22 </script> Getting: Identifier 'age' has already been declared.
var allows to declare a variable more than once. let does not allow you to declare and use the same variable again in the same file.
correction
<script>
let age = 20 // initial value
age = 20 // reassigning to a new value
</script>
L P<script>let age = 20 </script> <script>let age = 22 </script> Getting: Identifier 'age' has already been declared.
Ссылка
нажмите — покажем
нажмите — покажем
Join the JavaScript group: https://t.me/ThirtyDaysOfJavaScript