One way we can create an array is to use an array literal. An array literal creates an array by wrapping items in square brackets []. Remember from the previous exercise, arrays can store any data type. We can also save an array to a variable. Each element in an array has a numbered position known as its index. // Обратная индексация не работает, в отличии от Python Update Elements Once you have access to an element in an array, you can update its value. // Изменение через переменную позволяет менять значения элементов списка Arrays with let and const Variables declared with let can be reassigned.
Variables declared with the const keyword cannot be reassigned. However, elements in an array declared with const remain mutable. Meaning that we can change the contents of a const array, but cannot reassign a new array or a different value. // Можно менять значения элементов списка, обозначенного через const, но невозможно поменять такой список полностью, заменив на новый The .length prop